GUI: When clearing results, remove files in build dir

This commit is contained in:
Daniel Marjamäki 2020-04-29 18:10:01 +02:00
parent e89f5ab593
commit cdc530a25f
1 changed files with 6 additions and 0 deletions

View File

@ -1127,6 +1127,12 @@ void MainWindow::reAnalyze(bool all)
void MainWindow::clearResults() void MainWindow::clearResults()
{ {
if (mProjectFile && !mProjectFile->getBuildDir().isEmpty()) {
QDir dir(QFileInfo(mProjectFile->getFilename()).absolutePath() + '/' + mProjectFile->getBuildDir());
for (const QString& f: dir.entryList(QDir::Files)) {
dir.remove(f);
}
}
mUI.mResults->clear(true); mUI.mResults->clear(true);
Q_ASSERT(false == mUI.mResults->hasResults()); Q_ASSERT(false == mUI.mResults->hasResults());
enableResultsButtons(); enableResultsButtons();