Commit bbf2d599 authored by Tobias Hunger's avatar Tobias Hunger Committed by Tobias Hunger
Browse files

ShellCommandPage: Disable/enable back button



Change-Id: I19bed185ea89d47871efd07b34cc99b4739b7659
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent 1b1d97f9
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "qtcassert.h" #include "qtcassert.h"
#include "theme/theme.h" #include "theme/theme.h"
#include <QAbstractButton>
#include <QApplication> #include <QApplication>
#include <QLabel> #include <QLabel>
#include <QPlainTextEdit> #include <QPlainTextEdit>
...@@ -101,6 +102,8 @@ void ShellCommandPage::start(ShellCommand *command) ...@@ -101,6 +102,8 @@ void ShellCommandPage::start(ShellCommand *command)
m_statusLabel->setPalette(QPalette()); m_statusLabel->setPalette(QPalette());
m_state = Running; m_state = Running;
command->execute(); command->execute();
wizard()->button(QWizard::BackButton)->setEnabled(false);
} }
void ShellCommandPage::slotFinished(bool ok, int exitCode, const QVariant &) void ShellCommandPage::slotFinished(bool ok, int exitCode, const QVariant &)
...@@ -125,6 +128,7 @@ void ShellCommandPage::slotFinished(bool ok, int exitCode, const QVariant &) ...@@ -125,6 +128,7 @@ void ShellCommandPage::slotFinished(bool ok, int exitCode, const QVariant &)
m_statusLabel->setPalette(palette); m_statusLabel->setPalette(palette);
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
wizard()->button(QWizard::BackButton)->setEnabled(true);
if (success) if (success)
emit completeChanged(); emit completeChanged();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment