From 7259241062ee8725f134c362a654d3db490bb232 Mon Sep 17 00:00:00 2001 From: Samir Aguiar Date: Sun, 22 Mar 2015 18:36:37 +0100 Subject: [PATCH] editdialog: Don't add file filters on OS X Due to a Qt bug (QTBUG-38427), changing filters in a QFileDialog does not enable/disable files until the user changes directory. See issue #230. --- src/EditDialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/EditDialog.cpp b/src/EditDialog.cpp index b96e83d8..d969223b 100644 --- a/src/EditDialog.cpp +++ b/src/EditDialog.cpp @@ -78,8 +78,11 @@ void EditDialog::importData() QString fileName = QFileDialog::getOpenFileName( this, tr("Choose a file"), - PreferencesDialog::getSettingsValue("db", "defaultlocation").toString(), - tr("Text files(*.txt);;Image files(%1);;All files(*)").arg(image_formats)); + PreferencesDialog::getSettingsValue("db", "defaultlocation").toString() +#ifndef Q_OS_MAC // Filters on OS X are buggy + , tr("Text files(*.txt);;Image files(%1);;All files(*)").arg(image_formats) +#endif + ); if(QFile::exists(fileName)) { QFile file(fileName);