From 9f77929a4306a759c9d4bfb8cadc810ed4c05219 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Fri, 14 Nov 2014 15:19:18 +0100 Subject: b2qt-flashing-wizard: Handle script errors Change-Id: Ic470f3bdb4e2870279edcb3012160b9edea075ae Reviewed-by: Rainer Keller --- src/b2qt-flashing-wizard/progress_page.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/b2qt-flashing-wizard/progress_page.cpp') diff --git a/src/b2qt-flashing-wizard/progress_page.cpp b/src/b2qt-flashing-wizard/progress_page.cpp index 9c87d2d..01a8691 100644 --- a/src/b2qt-flashing-wizard/progress_page.cpp +++ b/src/b2qt-flashing-wizard/progress_page.cpp @@ -82,11 +82,19 @@ void ProgressPage::finished() wizard()->next(); // progress to next page automatically } +void ProgressPage::failed(const QString &message) +{ + mFinished = false; + emit completeChanged(); + mProgress->setText(message); +} + void ProgressPage::setActor(Actor *actor) { Q_ASSERT(actor); mActor = actor; connect(actor, &Actor::finished, this, &ProgressPage::finished); + connect(actor, &Actor::failed, this, &ProgressPage::failed); connect(actor, &Actor::details, this, &ProgressPage::addDetails); connect(actor, &Actor::progress, this, &ProgressPage::progress); } -- cgit v1.2.3