Commit e3ead3aa authored by Jan Möbius's avatar Jan Möbius

Revert commit 18754:

- Don't add plugin texturses to global scope

Revert commit 18755:
- Does not compile on Qt5 and is definitly wrong (selected filter is no output variable!) 

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18762 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3227dcd4
......@@ -1114,33 +1114,14 @@ QString getOpenFileName(const QString &configProperty,
QString getSaveFileName(const QString &configProperty,
QWidget * parent, const QString & caption,
const QString & defaultDir, const QString & filter,
QString * selectedFilter, QFileDialog::Options options,
const QString & defaultSuffix) {
QString * selectedFilter, QFileDialog::Options options) {
const QString dir = OpenFlipperSettings().value(configProperty, defaultDir).toString();
/*
* We don't use this convenience wrapper any more since it
* prevents us from setting the default suffix.
*
* const QString result = QFileDialog::getSaveFileName(
* parent, caption, dir, filter, selectedFilter, options);
*/
QFileDialog dialog(parent, caption, dir, filter);
dialog.setOptions(options);
dialog.setAcceptMode(QFileDialog::AcceptSave);
if (selectedFilter && !selectedFilter->isEmpty())
dialog.selectNameFilter(*selectedFilter);
dialog.setDefaultSuffix(defaultSuffix);
if (dialog.exec() == QDialog::Accepted) {
if (selectedFilter)
*selectedFilter = dialog.selectedFilter();
QString result = dialog.selectedFiles().value(0);
const QString result = QFileDialog::getSaveFileName(parent, caption, dir,
filter, selectedFilter, options);
if (result.length())
OpenFlipperSettings().setValue(configProperty, result);
return result;
}
return QString();
return result;
}
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly) {
......
......@@ -666,8 +666,7 @@ DLLEXPORT
QString getSaveFileName(const QString &configProperty,
QWidget * parent = 0, const QString & caption = QString(),
const QString & defaultDir = QString(), const QString & filter = QString(),
QString * selectedFilter = 0, QFileDialog::Options options = 0,
const QString & defaultSuffix = QString());
QString * selectedFilter = 0, QFileDialog::Options options = 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment