From ee2cea026a53b6529037a7f882c160a6670acac4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 17 Oct 2018 13:44:41 +0300 Subject: [PATCH] Fixed bug with incorrect platform used for check if check is run from UI and platform settings is taken from xml file. (#1434) --- gui/mainwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 9f60593e1..5855eb50d 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -870,8 +870,7 @@ Settings MainWindow::getCppcheckSettings() const QString platform = mProjectFile->getPlatform(); if (platform.endsWith(".xml")) { const QString applicationFilePath = QCoreApplication::applicationFilePath(); - const QString appPath = QFileInfo(applicationFilePath).canonicalPath(); - result.loadPlatformFile(appPath.toStdString().c_str(), platform.toStdString()); + result.loadPlatformFile(applicationFilePath.toStdString().c_str(), platform.toStdString()); } else { for (int i = cppcheck::Platform::Native; i <= cppcheck::Platform::Unix64; i++) { const cppcheck::Platform::PlatformType p = (cppcheck::Platform::PlatformType)i;