mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 03:21:43 -06:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user