From cdc530a25f4215891abff54baed2e287ff1d5122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 29 Apr 2020 18:10:01 +0200 Subject: [PATCH] GUI: When clearing results, remove files in build dir --- gui/mainwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 6c91e09e1..6f6c99ff8 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1127,6 +1127,12 @@ void MainWindow::reAnalyze(bool all) 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); Q_ASSERT(false == mUI.mResults->hasResults()); enableResultsButtons();