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: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 1b1d97f9
......@@ -34,6 +34,7 @@
#include "qtcassert.h"
#include "theme/theme.h"
#include <QAbstractButton>
#include <QApplication>
#include <QLabel>
#include <QPlainTextEdit>
......@@ -101,6 +102,8 @@ void ShellCommandPage::start(ShellCommand *command)
m_statusLabel->setPalette(QPalette());
m_state = Running;
command->execute();
wizard()->button(QWizard::BackButton)->setEnabled(false);
}
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);
QApplication::restoreOverrideCursor();
wizard()->button(QWizard::BackButton)->setEnabled(true);
if (success)
emit completeChanged();
......
Markdown is supported
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