diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 6da6335d0..15d4b08de 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -416,6 +416,11 @@ void MainWindow::ReCheck() { ClearResults(); EnableCheckButtons(false); + + const int filesCount = mThread->GetPreviousFilesCount(); + Q_ASSERT(filesCount > 0); // If no files should not be able to recheck + mUI.mResults->CheckingStarted(filesCount); + mThread->Check(GetCppcheckSettings(), true); } diff --git a/gui/threadhandler.cpp b/gui/threadhandler.cpp index 27c68963a..2dad5df0e 100644 --- a/gui/threadhandler.cpp +++ b/gui/threadhandler.cpp @@ -173,3 +173,8 @@ bool ThreadHandler::HasPreviousFiles() const return false; } + +int ThreadHandler::GetPreviousFilesCount() const +{ + return mLastFiles.size(); +} diff --git a/gui/threadhandler.h b/gui/threadhandler.h index bdb08b674..9f5b9a1e6 100644 --- a/gui/threadhandler.h +++ b/gui/threadhandler.h @@ -103,6 +103,13 @@ public: */ bool HasPreviousFiles() const; + /** + * @brief Return count of files we checked last time. + * + * @return count of files that were checked last time. + */ + int GetPreviousFilesCount() const; + signals: /** * @brief Signal that all threads are done