summaryrefslogtreecommitdiffstats
path: root/qt-ui/preferences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r--qt-ui/preferences.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 9d8aa061c..45777d320 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -4,6 +4,7 @@
#include <QDebug>
#include <QFileDialog>
#include <QMessageBox>
+#include <QSortFilterProxyModel>
PreferencesDialog* PreferencesDialog::instance()
{
@@ -105,7 +106,11 @@ void PreferencesDialog::setUiFromPrefs()
ui.vertical_speed_minutes->setChecked(prefs.units.vertical_speed_time == units::MINUTES);
ui.vertical_speed_seconds->setChecked(prefs.units.vertical_speed_time == units::SECONDS);
- ui.languageView->setModel( LanguageModel::instance() );
+ QSortFilterProxyModel *filterModel = new QSortFilterProxyModel();
+ filterModel->setSourceModel(LanguageModel::instance());
+ filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
+ ui.languageView->setModel(filterModel);
+ connect(ui.languageFilter, SIGNAL(textChanged(QString)), filterModel, SLOT(setFilterFixedString(QString)));
QSettings s;
s.beginGroup("Language");