Fixed: #2572 (GUI: Disable all UI actions on Recheck)
This commit is contained in:
parent
a1c1234596
commit
eddbfbee1e
|
@ -213,14 +213,11 @@ void MainWindow::DoCheckFiles(const QStringList &files)
|
||||||
QDir inf(mCurrentDirectory);
|
QDir inf(mCurrentDirectory);
|
||||||
const QString checkPath = inf.canonicalPath();
|
const QString checkPath = inf.canonicalPath();
|
||||||
mSettings->setValue(SETTINGS_CHECK_PATH, checkPath);
|
mSettings->setValue(SETTINGS_CHECK_PATH, checkPath);
|
||||||
EnableCheckButtons(false);
|
|
||||||
mUI.mActionSettings->setEnabled(false);
|
|
||||||
mUI.mActionOpenXML->setEnabled(false);
|
|
||||||
mUI.mResults->SetCheckDirectory(checkPath);
|
|
||||||
|
|
||||||
|
CheckLockDownUI(); // lock UI while checking
|
||||||
|
|
||||||
|
mUI.mResults->SetCheckDirectory(checkPath);
|
||||||
Settings checkSettings = GetCppcheckSettings();
|
Settings checkSettings = GetCppcheckSettings();
|
||||||
EnableProjectActions(false);
|
|
||||||
EnableProjectOpenActions(false);
|
|
||||||
mThread->Check(checkSettings, false);
|
mThread->Check(checkSettings, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,6 +397,15 @@ void MainWindow::CheckDone()
|
||||||
QApplication::alert(this, 3000);
|
QApplication::alert(this, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::CheckLockDownUI()
|
||||||
|
{
|
||||||
|
EnableCheckButtons(false);
|
||||||
|
mUI.mActionSettings->setEnabled(false);
|
||||||
|
mUI.mActionOpenXML->setEnabled(false);
|
||||||
|
EnableProjectActions(false);
|
||||||
|
EnableProjectOpenActions(false);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::ProgramSettings()
|
void MainWindow::ProgramSettings()
|
||||||
{
|
{
|
||||||
SettingsDialog dialog(mSettings, mApplications, mTranslation, this);
|
SettingsDialog dialog(mSettings, mApplications, mTranslation, this);
|
||||||
|
@ -418,7 +424,7 @@ void MainWindow::ProgramSettings()
|
||||||
void MainWindow::ReCheck()
|
void MainWindow::ReCheck()
|
||||||
{
|
{
|
||||||
ClearResults();
|
ClearResults();
|
||||||
EnableCheckButtons(false);
|
CheckLockDownUI(); // lock UI while checking
|
||||||
|
|
||||||
const int filesCount = mThread->GetPreviousFilesCount();
|
const int filesCount = mThread->GetPreviousFilesCount();
|
||||||
Q_ASSERT(filesCount > 0); // If no files should not be able to recheck
|
Q_ASSERT(filesCount > 0); // If no files should not be able to recheck
|
||||||
|
|
|
@ -206,6 +206,12 @@ protected slots:
|
||||||
*/
|
*/
|
||||||
void CheckDone();
|
void CheckDone();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Lock down UI while checking
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void CheckLockDownUI();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Slot for enabling save and clear button
|
* @brief Slot for enabling save and clear button
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue