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

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, ...@@ -1114,33 +1114,14 @@ QString getOpenFileName(const QString &configProperty,
QString getSaveFileName(const QString &configProperty, QString getSaveFileName(const QString &configProperty,
QWidget * parent, const QString & caption, QWidget * parent, const QString & caption,
const QString & defaultDir, const QString & filter, const QString & defaultDir, const QString & filter,
QString * selectedFilter, QFileDialog::Options options, QString * selectedFilter, QFileDialog::Options options) {
const QString & defaultSuffix) {
const QString dir = OpenFlipperSettings().value(configProperty, defaultDir).toString(); const QString dir = OpenFlipperSettings().value(configProperty, defaultDir).toString();
const QString result = QFileDialog::getSaveFileName(parent, caption, dir,
/* filter, selectedFilter, options);
* We don't use this convenience wrapper any more since it if (result.length())
* 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);
OpenFlipperSettings().setValue(configProperty, result); OpenFlipperSettings().setValue(configProperty, result);
return result; return result;
}
return QString();
} }
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly) { QStringList collectObjectComments(bool visibleOnly, bool targetedOnly) {
......
...@@ -666,8 +666,7 @@ DLLEXPORT ...@@ -666,8 +666,7 @@ DLLEXPORT
QString getSaveFileName(const QString &configProperty, QString getSaveFileName(const QString &configProperty,
QWidget * parent = 0, const QString & caption = QString(), QWidget * parent = 0, const QString & caption = QString(),
const QString & defaultDir = QString(), const QString & filter = QString(), const QString & defaultDir = QString(), const QString & filter = QString(),
QString * selectedFilter = 0, QFileDialog::Options options = 0, QString * selectedFilter = 0, QFileDialog::Options options = 0);
const QString & defaultSuffix = QString());
} }
......
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