Skip to content

Commit 189e09a

Browse files
committed
Fix #14829 (Platform configuration mismatch between UI selection and analysis log)
1 parent f9ca1b4 commit 189e09a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

gui/mainwindow.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLib, const bo
584584
});
585585
p.ignorePaths(v);
586586

587-
if (!mProjectFile->getAnalyzeAllVsConfigs()) {
587+
if (checkSettings.platform.type == Platform::Native && !mProjectFile->getAnalyzeAllVsConfigs()) {
588588
const Platform::Type platform = static_cast<Platform::Type>(mSettings->value(SETTINGS_CHECKED_PLATFORM, 0).toInt());
589589
std::vector<std::string> configurations;
590590
const QStringList configs = mProjectFile->getVsConfigurations();
@@ -1155,10 +1155,9 @@ bool MainWindow::getCppcheckSettings(Settings& settings, Suppressions& supprs)
11551155

11561156
const QString platform = mProjectFile->getPlatform();
11571157
if (platform.endsWith(".xml")) {
1158-
const std::vector<std::string> paths = {
1159-
Path::getCurrentPath(), // TODO: do we want to look in CWD?
1160-
QCoreApplication::applicationFilePath().toStdString(),
1161-
};
1158+
std::vector<std::string> paths;
1159+
for (const QString& p: mProjectFile->getSearchPaths("platform"))
1160+
paths.emplace_back(p.toStdString());
11621161
settings.platform.loadFromFile(paths, platform.toStdString());
11631162
} else {
11641163
for (int i = Platform::Type::Native; i <= Platform::Type::Unix64; i++) {

0 commit comments

Comments
 (0)