@@ -243,7 +243,7 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
243243 mUI ->mActionEditProjectFile ->setEnabled (mProjectFile != nullptr );
244244
245245 for (int i = 0 ; i < mPlatforms .getCount (); i++) {
246- Platform platform = mPlatforms .mPlatforms [i];
246+ PlatformData platform = mPlatforms .mPlatforms [i];
247247 QAction *action = new QAction (this );
248248 platform.mActMainWindow = action;
249249 mPlatforms .mPlatforms [i] = platform;
@@ -274,11 +274,11 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
274274 // For other platforms default to unspecified/default which means the
275275 // platform Cppcheck GUI was compiled on.
276276#if defined(_WIN32)
277- const cppcheck:: Platform::Type defaultPlatform = cppcheck:: Platform::Type::Win32W;
277+ const Platform::Type defaultPlatform = Platform::Type::Win32W;
278278#else
279- const cppcheck:: Platform::Type defaultPlatform = cppcheck:: Platform::Type::Unspecified;
279+ const Platform::Type defaultPlatform = Platform::Type::Unspecified;
280280#endif
281- Platform &platform = mPlatforms .get ((cppcheck:: Platform::Type)mSettings ->value (SETTINGS_CHECKED_PLATFORM, defaultPlatform).toInt ());
281+ PlatformData &platform = mPlatforms .get ((Platform::Type)mSettings ->value (SETTINGS_CHECKED_PLATFORM, defaultPlatform).toInt ());
282282 platform.mActMainWindow ->setChecked (true );
283283
284284 mNetworkAccessManager = new QNetworkAccessManager (this );
@@ -494,7 +494,7 @@ void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLibrary, cons
494494 p.ignorePaths (v);
495495
496496 if (!mProjectFile ->getAnalyzeAllVsConfigs ()) {
497- const cppcheck:: Platform::Type platform = (cppcheck:: Platform::Type) mSettings ->value (SETTINGS_CHECKED_PLATFORM, 0 ).toInt ();
497+ const Platform::Type platform = (Platform::Type) mSettings ->value (SETTINGS_CHECKED_PLATFORM, 0 ).toInt ();
498498 std::vector<std::string> configurations;
499499 const QStringList configs = mProjectFile ->getVsConfigurations ();
500500 std::transform (configs.cbegin (), configs.cend (), std::back_inserter (configurations), [](const QString& e) {
@@ -967,9 +967,9 @@ Settings MainWindow::getCppcheckSettings()
967967 const QString applicationFilePath = QCoreApplication::applicationFilePath ();
968968 result.platform .loadFromFile (applicationFilePath.toStdString ().c_str (), platform.toStdString ());
969969 } else {
970- for (int i = cppcheck:: Platform::Type::Native; i <= cppcheck:: Platform::Type::Unix64; i++) {
971- const cppcheck:: Platform::Type p = (cppcheck:: Platform::Type)i;
972- if (platform == cppcheck:: Platform::toString (p)) {
970+ for (int i = Platform::Type::Native; i <= Platform::Type::Unix64; i++) {
971+ const Platform::Type p = (Platform::Type)i;
972+ if (platform == Platform::toString (p)) {
973973 result.platform .set (p);
974974 break ;
975975 }
@@ -1060,8 +1060,8 @@ Settings MainWindow::getCppcheckSettings()
10601060 result.jobs = mSettings ->value (SETTINGS_CHECK_THREADS, 1 ).toInt ();
10611061 result.inlineSuppressions = mSettings ->value (SETTINGS_INLINE_SUPPRESSIONS, false ).toBool ();
10621062 result.certainty .setEnabled (Certainty::inconclusive, mSettings ->value (SETTINGS_INCONCLUSIVE_ERRORS, false ).toBool ());
1063- if (!mProjectFile || result.platform .type == cppcheck:: Platform::Type::Unspecified)
1064- result.platform .set ((cppcheck:: Platform::Type) mSettings ->value (SETTINGS_CHECKED_PLATFORM, 0 ).toInt ());
1063+ if (!mProjectFile || result.platform .type == Platform::Type::Unspecified)
1064+ result.platform .set ((Platform::Type) mSettings ->value (SETTINGS_CHECKED_PLATFORM, 0 ).toInt ());
10651065 result.standards .setCPP (mSettings ->value (SETTINGS_STD_CPP, QString ()).toString ().toStdString ());
10661066 result.standards .setC (mSettings ->value (SETTINGS_STD_C, QString ()).toString ().toStdString ());
10671067 result.enforcedLang = (Settings::Language)mSettings ->value (SETTINGS_ENFORCED_LANGUAGE, 0 ).toInt ();
@@ -1987,7 +1987,7 @@ void MainWindow::selectPlatform()
19871987{
19881988 QAction *action = qobject_cast<QAction *>(sender ());
19891989 if (action) {
1990- const cppcheck:: Platform::Type platform = (cppcheck:: Platform::Type) action->data ().toInt ();
1990+ const Platform::Type platform = (Platform::Type) action->data ().toInt ();
19911991 mSettings ->setValue (SETTINGS_CHECKED_PLATFORM, platform);
19921992 }
19931993}
0 commit comments