summaryrefslogtreecommitdiff
path: root/ui/qt5/runner/executepage.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-10 11:06:25 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-10 11:06:25 -0600
commitee5471ca10a671f97ef440a0f0fcc10b2161829f (patch)
tree16b8463e73cebfadd1fb0c613e4d24dce94b3ec0 /ui/qt5/runner/executepage.cc
parentde766db11e5677dc830bfdf0a383e887f6de3404 (diff)
downloadhorizon-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/qt5/runner/executepage.cc')
-rw-r--r--ui/qt5/runner/executepage.cc8
1 files changed, 8 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;