diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-10 11:06:25 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-10 11:06:25 -0600 |
commit | ee5471ca10a671f97ef440a0f0fcc10b2161829f (patch) | |
tree | 16b8463e73cebfadd1fb0c613e4d24dce94b3ec0 /ui | |
parent | de766db11e5677dc830bfdf0a383e887f6de3404 (diff) | |
download | horizon-ee5471ca10a671f97ef440a0f0fcc10b2161829f.tar.gz horizon-ee5471ca10a671f97ef440a0f0fcc10b2161829f.tar.bz2 horizon-ee5471ca10a671f97ef440a0f0fcc10b2161829f.tar.xz horizon-ee5471ca10a671f97ef440a0f0fcc10b2161829f.zip |
Qt Runner: Handle executor process failing to start at all
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt5/runner/executepage.cc | 8 | ||||
-rw-r--r-- | ui/qt5/runner/executepage.hh | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/qt5/runner/executepage.cc b/ui/qt5/runner/executepage.cc index a5ed839..c15c4a7 100644 --- a/ui/qt5/runner/executepage.cc +++ b/ui/qt5/runner/executepage.cc @@ -60,6 +60,8 @@ ExecutePage::ExecutePage(QWidget *parent) : HorizonWizardPage(parent) { this, &ExecutePage::executorReady); connect(executor, &QProcess::readyReadStandardOutput, this, &ExecutePage::executorOutReady); + connect(executor, &QProcess::errorOccurred, + this, &ExecutePage::executorErrored); connect(executor, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &ExecutePage::executorFinished); executor->start(); @@ -128,6 +130,12 @@ void ExecutePage::executorFinished(int code, QProcess::ExitStatus status) { finishTimer->start(); } +void ExecutePage::executorErrored(QProcess::ProcessError what) { + markFailed(this->current); + wizard()->button(QWizard::CancelButton)->setEnabled(false); + finishTimer->start(); +} + int ExecutePage::nextId() const { if(failed) { return ExecutorWizard::Page_Error; diff --git a/ui/qt5/runner/executepage.hh b/ui/qt5/runner/executepage.hh index 01289ff..32987e7 100644 --- a/ui/qt5/runner/executepage.hh +++ b/ui/qt5/runner/executepage.hh @@ -53,6 +53,7 @@ private: void executorReady(); void executorOutReady(); + void executorErrored(QProcess::ProcessError what); void executorFinished(int code, QProcess::ExitStatus status); }; |