Fixed #1831 (GUI: no progress bar when rechecking files)

Need to initialize the checking also when rechecking.
This commit is contained in:
Kimmo Varis 2010-07-07 12:25:47 +03:00
parent a1793edabe
commit f60a469932
3 changed files with 17 additions and 0 deletions

View File

@ -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);
}

View File

@ -173,3 +173,8 @@ bool ThreadHandler::HasPreviousFiles() const
return false;
}
int ThreadHandler::GetPreviousFilesCount() const
{
return mLastFiles.size();
}

View File

@ -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