Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,24 @@ void MainWindow::saveSettings() const
mUI->mResults->saveSettings(mSettings);
}

void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLib, const bool checkConfig)
void MainWindow::doAnalyzeProject(ImportProject p, const bool checkLib, const bool checkConfig, const QStringList& recheckFiles)
{
Settings checkSettings;
auto supprs = std::make_shared<Suppressions>();
if (!getCppcheckSettings(checkSettings, *supprs))
return;

// filter requested files
if (!recheckFiles.isEmpty()) {
QSet<QString> filesToCheck;
for (const QString& file : recheckFiles) {
filesToCheck.insert(file);
}
p.fileSettings.remove_if([&](const FileSettings& fs) {
return !filesToCheck.contains(QString::fromStdString(fs.filename()));
});
}

clearResults();

mIsLogfileLoaded = false;
Expand Down Expand Up @@ -1958,7 +1969,7 @@ void MainWindow::analyzeProject(const ProjectFile *projectFile, const QStringLis
msg.exec();
return;
}
doAnalyzeProject(p, checkLib, checkConfig); // TODO: avoid copy
doAnalyzeProject(p, checkLib, checkConfig, recheckFiles); // TODO: avoid copy
return;
}

Expand Down
2 changes: 1 addition & 1 deletion gui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ private slots:
* @param checkLib Flag to indicate if library should be checked
* @param checkConfig Flag to indicate if the configuration should be checked.
*/
void doAnalyzeProject(ImportProject p, bool checkLib = false, bool checkConfig = false);
void doAnalyzeProject(ImportProject p, bool checkLib = false, bool checkConfig = false, const QStringList& recheckFiles = QStringList());

/**
* @brief Analyze all files specified in parameter files
Expand Down
Loading