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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index f3a88fcd3..01f1815c2 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -8,7 +8,7 @@
PreferencesDialog* PreferencesDialog::instance()
{
- static PreferencesDialog *dialog = new PreferencesDialog(mainWindow());
+ static PreferencesDialog *dialog = new PreferencesDialog(MainWindow::instance());
dialog->setAttribute(Qt::WA_QuitOnClose, false);
LanguageModel::instance();
return dialog;
@@ -209,7 +209,7 @@ void PreferencesDialog::syncSettings()
bool useSystemLang = s.value("UseSystemLanguage", true).toBool();
if (useSystemLang != ui.languageSystemDefault->isChecked() ||
(!useSystemLang && s.value("UiLanguage").toString() != ui.languageView->currentIndex().data(Qt::UserRole))) {
- QMessageBox::warning(mainWindow(), tr("Restart required"),
+ QMessageBox::warning(MainWindow::instance(), tr("Restart required"),
tr("To correctly load a new language you must restart Subsurface."));
}
s.setValue("UseSystemLanguage", ui.languageSystemDefault->isChecked());