GUI: save platform setting

This commit is contained in:
Daniel Marjamäki 2014-06-14 18:47:19 +02:00
parent 8f0b57861c
commit 5471185781
1 changed files with 3 additions and 3 deletions

View File

@ -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()