Commit f4629856 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Fixed and re-reverted r18755.

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e3ead3aa
......@@ -1114,14 +1114,33 @@ 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) {
QString * selectedFilter, QFileDialog::Options options,
const QString & defaultSuffix) {
const QString dir = OpenFlipperSettings().value(configProperty, defaultDir).toString();
const QString result = QFileDialog::getSaveFileName(parent, caption, dir,
filter, selectedFilter, options);
if (result.length())
* 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);
if (selectedFilter && !selectedFilter->isEmpty())
if (dialog.exec() == QDialog::Accepted) {
if (selectedFilter)
*selectedFilter = dialog.selectedNameFilter();
QString result = dialog.selectedFiles().value(0);
OpenFlipperSettings().setValue(configProperty, result);
return result;
return result;
return QString();
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly) {
Supports Markdown
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