GUI: Enable clearing/saving results also if there are only hidden results.

This commit fixes a bug in my earlier commit that only checked visible results.
This commit is contained in:
Kimmo Varis 2009-06-20 23:42:12 +03:00
parent bf84ab4ab2
commit 2adfd3607d
5 changed files with 24 additions and 1 deletions

View File

@ -351,7 +351,7 @@ QStringList MainWindow::RemoveUnacceptedFiles(const QStringList &list)
void MainWindow::CheckDone()
{
EnableCheckButtons(true);
if (mResults.HasVisibleResults())
if (mResults.HasResults())
{
mActionClearResults.setEnabled(true);
mActionSave.setEnabled(true);

View File

@ -778,3 +778,8 @@ bool ResultsTree::HasVisibleResults() const
{
return mVisibleErrors;
}
bool ResultsTree::HasResults() const
{
return mModel.rowCount() > 0;
}

View File

@ -100,6 +100,12 @@ public:
*/
bool HasVisibleResults() const;
/**
* @brief Do we have results from check?
* @return true if there is at least one warning/error, hidden or visible.
*/
bool HasResults() const;
protected slots:
/**
* @brief Slot to quickstart an error with default application

View File

@ -170,3 +170,8 @@ bool ResultsView::HasVisibleResults() const
{
return mTree->HasVisibleResults();
}
bool ResultsView::HasResults() const
{
return mTree->HasResults();
}

View File

@ -97,6 +97,13 @@ public:
*/
bool HasVisibleResults() const;
/**
* @brief Do we have results from check?
*
* @return true if there is at least one warning/error, hidden or visible.
*/
bool HasResults() const;
signals:
/**