diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-12-07 09:09:00 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-12-13 12:11:21 -0600 |
commit | 1257064e43c6c4269e1b8cf0507b238fd4a0ab1a (patch) | |
tree | 7c025c87b292bb6ab046cb13aa71042b14510e3a /ui/qt5/runner/executepage.cc | |
parent | 70104d361e8ac781ffa50ac404e1e286e1239b43 (diff) | |
download | horizon-1257064e43c6c4269e1b8cf0507b238fd4a0ab1a.tar.gz horizon-1257064e43c6c4269e1b8cf0507b238fd4a0ab1a.tar.bz2 horizon-1257064e43c6c4269e1b8cf0507b238fd4a0ab1a.tar.xz horizon-1257064e43c6c4269e1b8cf0507b238fd4a0ab1a.zip |
Qt UI: runner: Add error page
Diffstat (limited to 'ui/qt5/runner/executepage.cc')
-rw-r--r-- | ui/qt5/runner/executepage.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/qt5/runner/executepage.cc b/ui/qt5/runner/executepage.cc index 817a61c..fd9581e 100644 --- a/ui/qt5/runner/executepage.cc +++ b/ui/qt5/runner/executepage.cc @@ -12,6 +12,8 @@ #include "executepage.hh" +#include "executorwizard.hh" + #include <QAbstractButton> #include <QGridLayout> #include <QProcess> @@ -21,6 +23,7 @@ ExecutePage::ExecutePage(QWidget *parent) : HorizonWizardPage(parent) { setTitle(tr("Installing Adélie Linux…")); loadWatermark("intro"); + failed = false; QLabel *descLabel = new QLabel(tr("Please wait while System Installation performs the following tasks:")); descLabel->setWordWrap(true); @@ -156,6 +159,7 @@ void ExecutePage::markFailed(Phase phase) { labelsForPhase(phase, &icon, &text); icon->setPixmap(loadDPIAwarePixmap("status-issue", ".svg")); text->setFont(boldFont); + failed = true; } void ExecutePage::executorReady() { @@ -196,3 +200,10 @@ void ExecutePage::executorFinished(int code, QProcess::ExitStatus status) { wizard()->button(QWizard::CancelButton)->setEnabled(false); finishTimer->start(); } + +int ExecutePage::nextId() const { + if(failed) { + return ExecutorWizard::Page_Error; + } + return ExecutorWizard::Page_Finished; +} |