forked from qt-creator/qt-creator
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: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
|
||||
using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
@@ -160,6 +161,13 @@ VcsCommandPage::VcsCommandPage()
|
||||
}
|
||||
|
||||
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());
|
||||
QTC_ASSERT(wiz, return);
|
||||
|
||||
@@ -69,6 +69,9 @@ public:
|
||||
void setVersionControlId(const QString &id);
|
||||
void setRunMessage(const QString &msg);
|
||||
|
||||
private slots:
|
||||
void delayedInitialize();
|
||||
|
||||
private:
|
||||
QString m_vcsId;
|
||||
QString m_repository;
|
||||
|
||||
Reference in New Issue
Block a user