From 5471185781803c9650c1bfcacfca7526c9dc524c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 14 Jun 2014 18:47:19 +0200 Subject: [PATCH] GUI: save platform setting --- gui/mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index a2d3e4da9..ad6ee66de 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -183,12 +183,12 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : // For other platforms default to unspecified/default which means the // platform Cppcheck GUI was compiled on. #if defined(_WIN32) - Platform &plat = mPlatforms.get(Settings::Win32A); + const Settings::PlatformType defaultPlat = Settings::Win32A; #else - Platform &plat = mPlatforms.get(Settings::Unspecified); + const Settings::PlatformType defaultPlat = Settings::Unspecified; #endif + Platform &plat = mPlatforms.get((Settings::PlatformType)mSettings->value(SETTINGS_CHECKED_PLATFORM, defaultPlat).toInt()); plat.mActMainWindow->setChecked(true); - mSettings->setValue(SETTINGS_CHECKED_PLATFORM, plat.mType); } MainWindow::~MainWindow()