GUI: Disable result cleaning and saving during the checking.
This commit is contained in:
parent
a5af858253
commit
0792d89a6b
|
@ -348,6 +348,11 @@ QStringList MainWindow::RemoveUnacceptedFiles(const QStringList &list)
|
||||||
void MainWindow::CheckDone()
|
void MainWindow::CheckDone()
|
||||||
{
|
{
|
||||||
EnableCheckButtons(true);
|
EnableCheckButtons(true);
|
||||||
|
if (mResults.HasVisibleResults())
|
||||||
|
{
|
||||||
|
mActionClearResults.setEnabled(true);
|
||||||
|
mActionSave.setEnabled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::ProgramSettings()
|
void MainWindow::ProgramSettings()
|
||||||
|
@ -522,6 +527,4 @@ void MainWindow::Save()
|
||||||
|
|
||||||
void MainWindow::ResultsAdded()
|
void MainWindow::ResultsAdded()
|
||||||
{
|
{
|
||||||
mActionClearResults.setEnabled(true);
|
|
||||||
mActionSave.setEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -774,7 +774,7 @@ void ResultsTree::RefreshFilePaths()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ResultsTree::VisibleErrors()
|
bool ResultsTree::HasVisibleResults() const
|
||||||
{
|
{
|
||||||
return mVisibleErrors;
|
return mVisibleErrors;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,10 +95,10 @@ public:
|
||||||
void SetCheckDirectory(const QString &dir);
|
void SetCheckDirectory(const QString &dir);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if there are any visible errors
|
* @brief Check if there are any visible results in view.
|
||||||
* @return true if there is at least one visible error
|
* @return true if there is at least one visible warning/error.
|
||||||
*/
|
*/
|
||||||
bool VisibleErrors();
|
bool HasVisibleResults() const;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -80,7 +80,7 @@ void ResultsView::Progress(int value, int max)
|
||||||
|
|
||||||
msg.exec();
|
msg.exec();
|
||||||
} //If we have errors but they aren't visible, tell user about it
|
} //If we have errors but they aren't visible, tell user about it
|
||||||
else if (!mTree->VisibleErrors())
|
else if (!mTree->HasVisibleResults())
|
||||||
{
|
{
|
||||||
QString text = tr("Errors were found, but they are configured to be hidden.\n"\
|
QString text = tr("Errors were found, but they are configured to be hidden.\n"\
|
||||||
"To toggle what kind of errors are shown, open view menu.");
|
"To toggle what kind of errors are shown, open view menu.");
|
||||||
|
@ -166,4 +166,7 @@ void ResultsView::CheckingStarted()
|
||||||
mProgress->setVisible(true);
|
mProgress->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ResultsView::HasVisibleResults() const
|
||||||
|
{
|
||||||
|
return mTree->HasVisibleResults();
|
||||||
|
}
|
||||||
|
|
|
@ -89,6 +89,14 @@ public:
|
||||||
* At the moment this only displays the progressbar
|
* At the moment this only displays the progressbar
|
||||||
*/
|
*/
|
||||||
void CheckingStarted();
|
void CheckingStarted();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Do we have visible results to show?
|
||||||
|
*
|
||||||
|
* @return true if there is at least one warning/error to show.
|
||||||
|
*/
|
||||||
|
bool HasVisibleResults() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue