Commit 097ff14b authored by Tobias Hunger's avatar Tobias Hunger
Browse files

VcsCommandPage: Disable back button when command is run

QWizard used to enable the back-button again after we were done
disabling it.

Change-Id: I14d756536de7d23cc4e6bac3a4e5a1d18b91f46d
Reviewed-by: default avatarOrgad Shaneh <>
parent ebf051be
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <QDir> #include <QDir>
#include <QDebug> #include <QDebug>
#include <QTimer>
using namespace Core; using namespace Core;
using namespace ProjectExplorer; using namespace ProjectExplorer;
...@@ -160,6 +161,13 @@ VcsCommandPage::VcsCommandPage() ...@@ -160,6 +161,13 @@ VcsCommandPage::VcsCommandPage()
} }
void VcsCommandPage::initializePage() void VcsCommandPage::initializePage()
// Delay real initialization till after QWizard is done with its setup.
// Otherwise QWizard will reset our disabled back button again.
QTimer::singleShot(0, this, &VcsCommandPage::delayedInitialize);
void VcsCommandPage::delayedInitialize()
{ {
auto wiz = qobject_cast<JsonWizard *>(wizard()); auto wiz = qobject_cast<JsonWizard *>(wizard());
QTC_ASSERT(wiz, return); QTC_ASSERT(wiz, return);
...@@ -69,6 +69,9 @@ public: ...@@ -69,6 +69,9 @@ public:
void setVersionControlId(const QString &id); void setVersionControlId(const QString &id);
void setRunMessage(const QString &msg); void setRunMessage(const QString &msg);
private slots:
void delayedInitialize();
private: private:
QString m_vcsId; QString m_vcsId;
QString m_repository; QString m_repository;
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