diff options
Diffstat (limited to 'ui/qt5/commitpage.cc')
-rw-r--r-- | ui/qt5/commitpage.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ui/qt5/commitpage.cc b/ui/qt5/commitpage.cc index ed35c19..7856a4a 100644 --- a/ui/qt5/commitpage.cc +++ b/ui/qt5/commitpage.cc @@ -18,6 +18,7 @@ #include <QLabel> #include <QVariant> +#include <QMessageBox> #include <QVBoxLayout> CommitPage::CommitPage(QWidget *parent) : HorizonWizardPage(parent) { @@ -110,3 +111,19 @@ void CommitPage::initializePage() { .arg(softString) .arg(field("hostname").toString())); } + +bool CommitPage::validatePage() { + bool running = std::any_of( + horizonWizard()->tools.begin(), horizonWizard()->tools.end(), + [](QProcess *tool) { + return tool->state() == QProcess::Running; + }); + + if(running) { + QMessageBox::information(horizonWizard(), tr("Tool(s) Still Running"), + tr("You must quit all tools before beginning System Installation.")); + return false; + } + + return true; +} |