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:
parent
bf84ab4ab2
commit
2adfd3607d
|
@ -351,7 +351,7 @@ QStringList MainWindow::RemoveUnacceptedFiles(const QStringList &list)
|
||||||
void MainWindow::CheckDone()
|
void MainWindow::CheckDone()
|
||||||
{
|
{
|
||||||
EnableCheckButtons(true);
|
EnableCheckButtons(true);
|
||||||
if (mResults.HasVisibleResults())
|
if (mResults.HasResults())
|
||||||
{
|
{
|
||||||
mActionClearResults.setEnabled(true);
|
mActionClearResults.setEnabled(true);
|
||||||
mActionSave.setEnabled(true);
|
mActionSave.setEnabled(true);
|
||||||
|
|
|
@ -778,3 +778,8 @@ bool ResultsTree::HasVisibleResults() const
|
||||||
{
|
{
|
||||||
return mVisibleErrors;
|
return mVisibleErrors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ResultsTree::HasResults() const
|
||||||
|
{
|
||||||
|
return mModel.rowCount() > 0;
|
||||||
|
}
|
||||||
|
|
|
@ -100,6 +100,12 @@ public:
|
||||||
*/
|
*/
|
||||||
bool HasVisibleResults() const;
|
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:
|
protected slots:
|
||||||
/**
|
/**
|
||||||
* @brief Slot to quickstart an error with default application
|
* @brief Slot to quickstart an error with default application
|
||||||
|
|
|
@ -170,3 +170,8 @@ bool ResultsView::HasVisibleResults() const
|
||||||
{
|
{
|
||||||
return mTree->HasVisibleResults();
|
return mTree->HasVisibleResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ResultsView::HasResults() const
|
||||||
|
{
|
||||||
|
return mTree->HasResults();
|
||||||
|
}
|
||||||
|
|
|
@ -97,6 +97,13 @@ public:
|
||||||
*/
|
*/
|
||||||
bool HasVisibleResults() const;
|
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:
|
signals:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue