mainwindow: Add filter to the open file dialog

As with #230, we don't add the filter on OS X
due to Qt bugs not yet fixed.

See issue #266.
This commit is contained in:
Samir Aguiar
2015-04-23 19:37:05 +02:00
parent 506804a74e
commit 4c7703659b
+5 -1
View File
@@ -200,7 +200,11 @@ bool MainWindow::fileOpen(const QString& fileName, bool dontAddToRecentFiles)
wFile = QFileDialog::getOpenFileName(
this,
tr("Choose a database file"),
PreferencesDialog::getSettingsValue("db", "defaultlocation").toString());
PreferencesDialog::getSettingsValue("db", "defaultlocation").toString()
#ifndef Q_OS_MAC // Filters on OS X are buggy
, tr("SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*)")
#endif
);
}
if(QFile::exists(wFile) )
{