Fix #455 (Recheck is enabled when no previous results available)
http://sourceforge.net/apps/trac/cppcheck/ticket/455
This commit is contained in:
parent
be0c79f36c
commit
8e0f868a5e
|
@ -89,6 +89,7 @@ MainWindow::MainWindow() :
|
|||
|
||||
mUI.mActionClearResults->setEnabled(false);
|
||||
mUI.mActionSave->setEnabled(false);
|
||||
mUI.mActionRecheck->setEnabled(false);
|
||||
|
||||
|
||||
|
||||
|
@ -419,7 +420,10 @@ void MainWindow::EnableCheckButtons(bool enable)
|
|||
{
|
||||
mUI.mActionStop->setEnabled(!enable);
|
||||
mUI.mActionCheckFiles->setEnabled(enable);
|
||||
|
||||
if (!enable || mThread->HasPreviousFiles())
|
||||
mUI.mActionRecheck->setEnabled(enable);
|
||||
|
||||
mUI.mActionCheckDirectory->setEnabled(enable);
|
||||
}
|
||||
|
||||
|
|
|
@ -166,3 +166,10 @@ void ThreadHandler::SaveSettings(QSettings &settings)
|
|||
settings.setValue(SETTINGS_CHECK_THREADS, mThreads.size());
|
||||
}
|
||||
|
||||
bool ThreadHandler::HasPreviousFiles() const
|
||||
{
|
||||
if (mLastFiles.size() > 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -96,6 +96,13 @@ public:
|
|||
*/
|
||||
bool IsChecking() const;
|
||||
|
||||
/**
|
||||
* @brief Have we checked files already?
|
||||
*
|
||||
* @return true check has been previously run and recheck can be done
|
||||
*/
|
||||
bool HasPreviousFiles() const;
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief Signal that all threads are done
|
||||
|
|
Loading…
Reference in New Issue