ShellCommandPage: Disable/enable back button

Change-Id: I19bed185ea89d47871efd07b34cc99b4739b7659
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2015-05-05 16:26:26 +02:00
committed by Tobias Hunger
parent 1b1d97f9ed
commit bbf2d59981

View File

@@ -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();