Unify wizards with TOC and cancel button.

QTBUG-28385 is biting us over and over (QWizard doesn't have close
button nor cancel button on Mac in Qt 5), and actually there's no reason
for us having a wizard without the features from Utils::Wizard.

Task-number: QTCREATORBUG-10346
Task-number: QTBUG-28385
Change-Id: I80c0d82fe6738496c2ac03c31a1c2757ade8e266
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2013-10-09 11:20:26 +02:00
parent 1ba9c8ef14
commit 56c3d8ffab
33 changed files with 41 additions and 92 deletions

View File

@@ -30,8 +30,6 @@
#include "filewizarddialog.h" #include "filewizarddialog.h"
#include "filewizardpage.h" #include "filewizardpage.h"
#include "hostosinfo.h"
#include <QAbstractButton> #include <QAbstractButton>
/*! /*!
@@ -49,18 +47,6 @@ FileWizardDialog::FileWizardDialog(QWidget *parent) :
Wizard(parent), Wizard(parent),
m_filePage(new FileWizardPage) m_filePage(new FileWizardPage)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setOption(QWizard::NoCancelButton, false);
setOption(QWizard::NoDefaultButton, false);
if (HostOsInfo::isMacHost()) {
setButtonLayout(QList<QWizard::WizardButton>()
<< QWizard::CancelButton
<< QWizard::Stretch
<< QWizard::BackButton
<< QWizard::NextButton
<< QWizard::CommitButton
<< QWizard::FinishButton);
}
const int filePageId = addPage(m_filePage); const int filePageId = addPage(m_filePage);
wizardProgress()->item(filePageId)->setTitle(tr("Location")); wizardProgress()->item(filePageId)->setTitle(tr("Location"));
connect(m_filePage, SIGNAL(activated()), button(QWizard::FinishButton), SLOT(animateClick())); connect(m_filePage, SIGNAL(activated()), button(QWizard::FinishButton), SLOT(animateClick()));

View File

@@ -28,6 +28,7 @@
****************************************************************************/ ****************************************************************************/
#include "wizard.h" #include "wizard.h"
#include "hostosinfo.h"
#include <QMap> #include <QMap>
#include <QHash> #include <QHash>
@@ -318,6 +319,20 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
connect(this, SIGNAL(pageAdded(int)), this, SLOT(_q_pageAdded(int))); connect(this, SIGNAL(pageAdded(int)), this, SLOT(_q_pageAdded(int)));
connect(this, SIGNAL(pageRemoved(int)), this, SLOT(_q_pageRemoved(int))); connect(this, SIGNAL(pageRemoved(int)), this, SLOT(_q_pageRemoved(int)));
setSideWidget(new LinearProgressWidget(d_ptr->m_wizardProgress, this)); setSideWidget(new LinearProgressWidget(d_ptr->m_wizardProgress, this));
setOption(QWizard::NoCancelButton, false);
setOption(QWizard::NoDefaultButton, false);
setOption(QWizard::NoBackButtonOnStartPage, true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
if (Utils::HostOsInfo::isMacHost()) {
setButtonLayout(QList<QWizard::WizardButton>()
<< QWizard::CancelButton
<< QWizard::Stretch
<< QWizard::BackButton
<< QWizard::NextButton
<< QWizard::CommitButton
<< QWizard::FinishButton);
}
} }
Wizard::~Wizard() Wizard::~Wizard()

View File

@@ -131,8 +131,6 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
CreateAndroidManifestWizard::CreateAndroidManifestWizard(ProjectExplorer::Target *target) CreateAndroidManifestWizard::CreateAndroidManifestWizard(ProjectExplorer::Target *target)
: m_target(target), m_node(0) : m_target(target), m_node(0)
{ {
setOption(QWizard::NoBackButtonOnStartPage);
setOption(QWizard::NoCancelButton, false);
setWindowTitle(tr("Create Android Manifest Wizard")); setWindowTitle(tr("Create Android Manifest Wizard"));
Qt4Project *project = static_cast<Qt4Project *>(target->project()); Qt4Project *project = static_cast<Qt4Project *>(target->project());

View File

@@ -57,12 +57,6 @@ AutotoolsOpenProjectWizard::AutotoolsOpenProjectWizard(AutotoolsManager *manager
setPage(BuildPathPageId, new BuildPathPage(this)); setPage(BuildPathPageId, new BuildPathPage(this));
setStartId(BuildPathPageId); setStartId(BuildPathPageId);
init();
}
void AutotoolsOpenProjectWizard::init()
{
setOption(QWizard::NoBackButtonOnStartPage);
setWindowTitle(tr("Autotools Wizard")); setWindowTitle(tr("Autotools Wizard"));
} }

View File

@@ -63,7 +63,6 @@ public:
AutotoolsManager *autotoolsManager() const; AutotoolsManager *autotoolsManager() const;
private: private:
void init();
AutotoolsManager *m_manager; AutotoolsManager *m_manager;
QString m_buildDirectory; QString m_buildDirectory;
QString m_sourceDirectory; QString m_sourceDirectory;

View File

@@ -55,7 +55,7 @@ public:
} //namespace Internal } //namespace Internal
BareMetalDeviceConfigurationWizard::BareMetalDeviceConfigurationWizard(QWidget *parent) : BareMetalDeviceConfigurationWizard::BareMetalDeviceConfigurationWizard(QWidget *parent) :
QWizard(parent), Utils::Wizard(parent),
d(new Internal::BareMetalDeviceConfigrationWizardPrivate(this)) d(new Internal::BareMetalDeviceConfigrationWizardPrivate(this))
{ {
setWindowTitle(tr("New Bare Metal Device Configuration Setup")); setWindowTitle(tr("New Bare Metal Device Configuration Setup"));

View File

@@ -31,15 +31,14 @@
#define BAREMETALDEVICECONFIGURATIONWIZARD_H #define BAREMETALDEVICECONFIGURATIONWIZARD_H
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <utils/wizard.h>
#include <QWizard>
namespace BareMetal { namespace BareMetal {
namespace Internal { namespace Internal {
class BareMetalDeviceConfigrationWizardPrivate; class BareMetalDeviceConfigrationWizardPrivate;
} // namespace Internal } // namespace Internal
class BareMetalDeviceConfigurationWizard : public QWizard class BareMetalDeviceConfigurationWizard : public Utils::Wizard
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@@ -273,8 +273,6 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, CMake
void CMakeOpenProjectWizard::init() void CMakeOpenProjectWizard::init()
{ {
setOption(QWizard::NoBackButtonOnStartPage);
setOption(QWizard::NoCancelButton, false);
setWindowTitle(tr("CMake Wizard")); setWindowTitle(tr("CMake Wizard"));
} }

View File

@@ -37,7 +37,6 @@
#include <utils/filewizarddialog.h> #include <utils/filewizarddialog.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
#include <utils/hostosinfo.h>
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
@@ -345,28 +344,6 @@ bool BaseFileWizard::writeFiles(const GeneratedFiles &files, QString *errorMessa
return true; return true;
} }
/*!
Sets some standard options on a QWizard.
*/
void BaseFileWizard::setupWizard(QWizard *w)
{
w->setOption(QWizard::NoCancelButton, false);
w->setOption(QWizard::NoDefaultButton, false);
w->setOption(QWizard::NoBackButtonOnStartPage, true);
w->setWindowFlags(w->windowFlags() & ~Qt::WindowContextHelpButtonHint);
if (Utils::HostOsInfo::isMacHost()) {
w->setButtonLayout(QList<QWizard::WizardButton>()
<< QWizard::CancelButton
<< QWizard::Stretch
<< QWizard::BackButton
<< QWizard::NextButton
<< QWizard::CommitButton
<< QWizard::FinishButton);
}
}
/*! /*!
Reads the \c shortTitle dynamic property of \a pageId and applies it as Reads the \c shortTitle dynamic property of \a pageId and applies it as
the title of corresponding progress item. the title of corresponding progress item.
@@ -571,7 +548,6 @@ QWizard *StandardFileWizard::createWizardDialog(QWidget *parent,
if (wizardDialogParameters.flags().testFlag(WizardDialogParameters::ForceCapitalLetterForFileName)) if (wizardDialogParameters.flags().testFlag(WizardDialogParameters::ForceCapitalLetterForFileName))
standardWizardDialog->setForceFirstCapitalLetterForFileName(true); standardWizardDialog->setForceFirstCapitalLetterForFileName(true);
standardWizardDialog->setWindowTitle(tr("New %1").arg(displayName())); standardWizardDialog->setWindowTitle(tr("New %1").arg(displayName()));
setupWizard(standardWizardDialog);
standardWizardDialog->setPath(wizardDialogParameters.defaultPath()); standardWizardDialog->setPath(wizardDialogParameters.defaultPath());
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, wizardDialogParameters.extensionPages())
BaseFileWizard::applyExtensionPageShortTitle(standardWizardDialog, standardWizardDialog->addPage(p)); BaseFileWizard::applyExtensionPageShortTitle(standardWizardDialog, standardWizardDialog->addPage(p));

View File

@@ -114,7 +114,6 @@ public:
virtual void runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues); virtual void runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues);
static QString buildFileName(const QString &path, const QString &baseName, const QString &extension); static QString buildFileName(const QString &path, const QString &baseName, const QString &extension);
static void setupWizard(QWizard *);
static void applyExtensionPageShortTitle(Utils::Wizard *wizard, int pageId); static void applyExtensionPageShortTitle(Utils::Wizard *wizard, int pageId);
protected: protected:

View File

@@ -114,7 +114,6 @@ CppClassWizardDialog::CppClassWizardDialog(QWidget *parent) :
Utils::Wizard(parent), Utils::Wizard(parent),
m_classNamePage(new ClassNamePage(this)) m_classNamePage(new ClassNamePage(this))
{ {
Core::BaseFileWizard::setupWizard(this);
setWindowTitle(tr("C++ Class Wizard")); setWindowTitle(tr("C++ Class Wizard"));
const int classNameId = addPage(m_classNamePage); const int classNameId = addPage(m_classNamePage);
wizardProgress()->item(classNameId)->setTitle(tr("Details")); wizardProgress()->item(classNameId)->setTitle(tr("Details"));

View File

@@ -54,7 +54,6 @@ FormWizardDialog::FormWizardDialog(const WizardPageList &extensionPages,
void FormWizardDialog::init(const WizardPageList &extensionPages) void FormWizardDialog::init(const WizardPageList &extensionPages)
{ {
Core::BaseFileWizard::setupWizard(this);
setWindowTitle(tr("Qt Designer Form")); setWindowTitle(tr("Qt Designer Form"));
setPage(FormPageId, m_formPage); setPage(FormPageId, m_formPage);
wizardProgress()->item(FormPageId)->setTitle(tr("Form Template")); wizardProgress()->item(FormPageId)->setTitle(tr("Form Template"));

View File

@@ -131,7 +131,6 @@ QWizard *GenericProjectWizard::createWizardDialog(QWidget *parent,
const Core::WizardDialogParameters &wizardDialogParameters) const const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
GenericProjectWizardDialog *wizard = new GenericProjectWizardDialog(parent); GenericProjectWizardDialog *wizard = new GenericProjectWizardDialog(parent);
setupWizard(wizard);
wizard->setPath(wizardDialogParameters.defaultPath()); wizard->setPath(wizardDialogParameters.defaultPath());

View File

@@ -132,7 +132,6 @@ QWizard *GLSLFileWizard::createWizardDialog(QWidget *parent,
{ {
GLSLFileWizardDialog *wizardDialog = new GLSLFileWizardDialog(parent); GLSLFileWizardDialog *wizardDialog = new GLSLFileWizardDialog(parent);
wizardDialog->setWindowTitle(tr("New %1").arg(displayName())); wizardDialog->setWindowTitle(tr("New %1").arg(displayName()));
setupWizard(wizardDialog);
wizardDialog->setPath(wizardDialogParameters.defaultPath()); wizardDialog->setPath(wizardDialogParameters.defaultPath());
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, wizardDialogParameters.extensionPages())
BaseFileWizard::applyExtensionPageShortTitle(wizardDialog, wizardDialog->addPage(p)); BaseFileWizard::applyExtensionPageShortTitle(wizardDialog, wizardDialog->addPage(p));

View File

@@ -89,7 +89,6 @@ BaseProjectWizardDialog::BaseProjectWizardDialog(Utils::ProjectIntroPage *introP
void BaseProjectWizardDialog::init() void BaseProjectWizardDialog::init()
{ {
Core::BaseFileWizard::setupWizard(this);
if (d->introPageId == -1) { if (d->introPageId == -1) {
d->introPageId = addPage(d->introPage); d->introPageId = addPage(d->introPage);
} else { } else {

View File

@@ -145,7 +145,6 @@ void CustomWizard::initWizardDialog(Utils::Wizard *wizard, const QString &defaul
customPage->setTitle(parameters()->fieldPageTitle); customPage->setTitle(parameters()->fieldPageTitle);
foreach (QWizardPage *ep, extensionPages) foreach (QWizardPage *ep, extensionPages)
BaseFileWizard::applyExtensionPageShortTitle(wizard, wizard->addPage(ep)); BaseFileWizard::applyExtensionPageShortTitle(wizard, wizard->addPage(ep));
Core::BaseFileWizard::setupWizard(wizard);
if (CustomWizardPrivate::verbose) if (CustomWizardPrivate::verbose)
qDebug() << "initWizardDialog" << wizard << wizard->pageIds(); qDebug() << "initWizardDialog" << wizard << wizard->pageIds();
} }

View File

@@ -41,7 +41,6 @@ ClassWizardDialog::ClassWizardDialog(QWidget *parent)
, m_classNamePage(new ClassNamePage(this)) , m_classNamePage(new ClassNamePage(this))
{ {
setWindowTitle(tr("Python Class Wizard")); setWindowTitle(tr("Python Class Wizard"));
Core::BaseFileWizard::setupWizard(this);
const int classNameId = addPage(m_classNamePage.data()); const int classNameId = addPage(m_classNamePage.data());
wizardProgress()->item(classNameId)->setTitle(tr("Details")); wizardProgress()->item(classNameId)->setTitle(tr("Details"));
} }

View File

@@ -70,7 +70,6 @@ QWizard *FileWizard::createWizardDialog(QWidget *parent,
{ {
Utils::FileWizardDialog *pDialog = new Utils::FileWizardDialog(parent); Utils::FileWizardDialog *pDialog = new Utils::FileWizardDialog(parent);
pDialog->setWindowTitle(tr("New %1").arg(displayName())); pDialog->setWindowTitle(tr("New %1").arg(displayName()));
setupWizard(pDialog);
pDialog->setPath(params.defaultPath()); pDialog->setPath(params.defaultPath());
foreach (QWizardPage *p, params.extensionPages()) foreach (QWizardPage *p, params.extensionPages())
applyExtensionPageShortTitle(pDialog, pDialog->addPage(p)); applyExtensionPageShortTitle(pDialog, pDialog->addPage(p));

View File

@@ -127,7 +127,6 @@ QWizard *JsFileWizard::createWizardDialog(QWidget *parent,
{ {
JsFileWizardDialog *wizardDialog = new JsFileWizardDialog(parent); JsFileWizardDialog *wizardDialog = new JsFileWizardDialog(parent);
wizardDialog->setWindowTitle(tr("New %1").arg(displayName())); wizardDialog->setWindowTitle(tr("New %1").arg(displayName()));
setupWizard(wizardDialog);
wizardDialog->setPath(wizardDialogParameters.defaultPath()); wizardDialog->setPath(wizardDialogParameters.defaultPath());
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, wizardDialogParameters.extensionPages())
BaseFileWizard::applyExtensionPageShortTitle(wizardDialog, wizardDialog->addPage(p)); BaseFileWizard::applyExtensionPageShortTitle(wizardDialog, wizardDialog->addPage(p));

View File

@@ -41,7 +41,7 @@ using namespace Qnx;
using namespace Qnx::Internal; using namespace Qnx::Internal;
BlackBerryDeviceConfigurationWizard::BlackBerryDeviceConfigurationWizard(QWidget *parent) : BlackBerryDeviceConfigurationWizard::BlackBerryDeviceConfigurationWizard(QWidget *parent) :
QWizard(parent) Utils::Wizard(parent)
{ {
setWindowTitle(tr("New BlackBerry Device Configuration Setup")); setWindowTitle(tr("New BlackBerry Device Configuration Setup"));

View File

@@ -34,14 +34,13 @@
#include "blackberrydeviceconfigurationwizardpages.h" #include "blackberrydeviceconfigurationwizardpages.h"
#include <QWizard>
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <utils/wizard.h>
namespace Qnx { namespace Qnx {
namespace Internal { namespace Internal {
class BlackBerryDeviceConfigurationWizard : public QWizard class BlackBerryDeviceConfigurationWizard : public Utils::Wizard
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@@ -75,7 +75,7 @@ BlackBerryDeviceConfigurationWizardSetupPage::BlackBerryDeviceConfigurationWizar
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
setTitle(tr("Connection Details")); setTitle(tr("Connection"));
connect(m_ui->deviceListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onDeviceSelectionChanged())); connect(m_ui->deviceListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onDeviceSelectionChanged()));
connect(m_deviceListDetector, SIGNAL(deviceDetected(QString,QString,bool)), connect(m_deviceListDetector, SIGNAL(deviceDetected(QString,QString,bool)),
@@ -225,7 +225,7 @@ BlackBerryDeviceConfigurationWizardQueryPage::BlackBerryDeviceConfigurationWizar
, m_deviceInformation(new BlackBerryDeviceInformation(this)) , m_deviceInformation(new BlackBerryDeviceInformation(this))
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
setTitle(tr("Query Device Information")); setTitle(tr("Device Information"));
m_ui->progressBar->setMaximum(Done); m_ui->progressBar->setMaximum(Done);
connect(m_deviceInformation,SIGNAL(finished(int)),this,SLOT(processQueryFinished(int))); connect(m_deviceInformation,SIGNAL(finished(int)),this,SLOT(processQueryFinished(int)));
@@ -426,7 +426,7 @@ QString BlackBerryDeviceConfigurationWizardConfigPage::debugToken() const
BlackBerryDeviceConfigurationWizardFinalPage::BlackBerryDeviceConfigurationWizardFinalPage(QWidget *parent) BlackBerryDeviceConfigurationWizardFinalPage::BlackBerryDeviceConfigurationWizardFinalPage(QWidget *parent)
: QWizardPage(parent) : QWizardPage(parent)
{ {
setTitle(tr("Setup Finished")); setTitle(tr("Summary"));
QVBoxLayout *layout = new QVBoxLayout(this); QVBoxLayout *layout = new QVBoxLayout(this);
QLabel *label = new QLabel(tr("The new device configuration will be created now."), this); QLabel *label = new QLabel(tr("The new device configuration will be created now."), this);

View File

@@ -42,7 +42,7 @@ using namespace Qnx::Internal;
BlackBerryInstallWizard::BlackBerryInstallWizard(BlackBerryInstallerDataHandler::Mode mode, BlackBerryInstallWizard::BlackBerryInstallWizard(BlackBerryInstallerDataHandler::Mode mode,
const QString& version, const QString& version,
QWidget *parent) QWidget *parent)
: QWizard(parent) : Utils::Wizard(parent)
, m_ndkPage(0) , m_ndkPage(0)
, m_targetPage(0) , m_targetPage(0)
{ {

View File

@@ -32,9 +32,9 @@
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H #ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H #define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
#include <QProcess> #include <utils/wizard.h>
#include <QWizard> #include <QProcess>
namespace Qnx { namespace Qnx {
namespace Internal { namespace Internal {
@@ -61,7 +61,7 @@ public:
Mode mode; Mode mode;
}; };
class BlackBerryInstallWizard : public QWizard class BlackBerryInstallWizard : public Utils::Wizard
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@@ -57,7 +57,7 @@ using namespace Qnx;
using namespace Qnx::Internal; using namespace Qnx::Internal;
BlackBerrySetupWizard::BlackBerrySetupWizard(QWidget *parent) : BlackBerrySetupWizard::BlackBerrySetupWizard(QWidget *parent) :
QWizard(parent), Utils::Wizard(parent),
m_ndkPage(0), m_ndkPage(0),
m_keysPage(0), m_keysPage(0),
m_certificatePage(0), m_certificatePage(0),

View File

@@ -32,12 +32,12 @@
#ifndef BLACKBERRYSETUPWIZARD_H #ifndef BLACKBERRYSETUPWIZARD_H
#define BLACKBERRYSETUPWIZARD_H #define BLACKBERRYSETUPWIZARD_H
#include <QWizard> #include <projectexplorer/devicesupport/idevice.h>
#include <utils/wizard.h>
#include <QList> #include <QList>
#include <QByteArray> #include <QByteArray>
#include <projectexplorer/devicesupport/idevice.h>
namespace QSsh { namespace QSsh {
class SshKeyGenerator; class SshKeyGenerator;
} }
@@ -57,7 +57,7 @@ class BlackBerryDebugTokenRequester;
class BlackBerryDebugTokenUploader; class BlackBerryDebugTokenUploader;
class BlackBerrySigningUtils; class BlackBerrySigningUtils;
class BlackBerrySetupWizard : public QWizard class BlackBerrySetupWizard : public Utils::Wizard
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@@ -143,7 +143,6 @@ QWizard *CascadesImportWizard::createWizardDialog(QWidget *parent,
const Core::WizardDialogParameters &wizardDialogParameters) const const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
CascadesImportWizardDialog *wizard = new CascadesImportWizardDialog(parent); CascadesImportWizardDialog *wizard = new CascadesImportWizardDialog(parent);
setupWizard(wizard);
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, wizardDialogParameters.extensionPages())
BaseFileWizard::applyExtensionPageShortTitle(wizard, wizard->addPage(p)); BaseFileWizard::applyExtensionPageShortTitle(wizard, wizard->addPage(p));

View File

@@ -44,7 +44,7 @@ using namespace Qnx;
using namespace Qnx::Internal; using namespace Qnx::Internal;
QnxDeviceConfigurationWizard::QnxDeviceConfigurationWizard(QWidget *parent) : QnxDeviceConfigurationWizard::QnxDeviceConfigurationWizard(QWidget *parent) :
QWizard(parent) Utils::Wizard(parent)
{ {
setWindowTitle(tr("New QNX Device Configuration Setup")); setWindowTitle(tr("New QNX Device Configuration Setup"));

View File

@@ -32,9 +32,8 @@
#ifndef QNX_INTERNAL_QNXDEVICECONFIGURATIONWIZARD_H #ifndef QNX_INTERNAL_QNXDEVICECONFIGURATIONWIZARD_H
#define QNX_INTERNAL_QNXDEVICECONFIGURATIONWIZARD_H #define QNX_INTERNAL_QNXDEVICECONFIGURATIONWIZARD_H
#include <QWizard>
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <utils/wizard.h>
namespace RemoteLinux { namespace RemoteLinux {
class GenericLinuxDeviceConfigurationWizardSetupPage; class GenericLinuxDeviceConfigurationWizardSetupPage;
@@ -44,7 +43,7 @@ class GenericLinuxDeviceConfigurationWizardFinalPage;
namespace Qnx { namespace Qnx {
namespace Internal { namespace Internal {
class QnxDeviceConfigurationWizard : public QWizard class QnxDeviceConfigurationWizard : public Utils::Wizard
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@@ -58,7 +58,7 @@ public:
} // namespace Internal } // namespace Internal
GenericLinuxDeviceConfigurationWizard::GenericLinuxDeviceConfigurationWizard(QWidget *parent) GenericLinuxDeviceConfigurationWizard::GenericLinuxDeviceConfigurationWizard(QWidget *parent)
: QWizard(parent), : Utils::Wizard(parent),
d(new Internal::GenericLinuxDeviceConfigurationWizardPrivate(this)) d(new Internal::GenericLinuxDeviceConfigurationWizardPrivate(this))
{ {
setWindowTitle(tr("New Generic Linux Device Configuration Setup")); setWindowTitle(tr("New Generic Linux Device Configuration Setup"));

View File

@@ -32,15 +32,14 @@
#include "remotelinux_export.h" #include "remotelinux_export.h"
#include <projectexplorer/devicesupport/idevice.h> #include <projectexplorer/devicesupport/idevice.h>
#include <utils/wizard.h>
#include <QWizard>
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal { namespace Internal {
class GenericLinuxDeviceConfigurationWizardPrivate; class GenericLinuxDeviceConfigurationWizardPrivate;
} // namespace Internal } // namespace Internal
class REMOTELINUX_EXPORT GenericLinuxDeviceConfigurationWizard : public QWizard class REMOTELINUX_EXPORT GenericLinuxDeviceConfigurationWizard : public Utils::Wizard
{ {
Q_OBJECT Q_OBJECT

View File

@@ -56,7 +56,7 @@ GenericLinuxDeviceConfigurationWizardSetupPage::GenericLinuxDeviceConfigurationW
QWizardPage(parent), d(new Internal::GenericLinuxDeviceConfigurationWizardSetupPagePrivate) QWizardPage(parent), d(new Internal::GenericLinuxDeviceConfigurationWizardSetupPagePrivate)
{ {
d->ui.setupUi(this); d->ui.setupUi(this);
setTitle(tr("Connection Data")); setTitle(tr("Connection"));
setSubTitle(QLatin1String(" ")); // For Qt bug (background color) setSubTitle(QLatin1String(" ")); // For Qt bug (background color)
d->ui.privateKeyPathChooser->setExpectedKind(PathChooser::File); d->ui.privateKeyPathChooser->setExpectedKind(PathChooser::File);
d->ui.privateKeyPathChooser->setPromptDialogTitle(tr("Choose a Private Key File")); d->ui.privateKeyPathChooser->setPromptDialogTitle(tr("Choose a Private Key File"));
@@ -153,7 +153,7 @@ void GenericLinuxDeviceConfigurationWizardSetupPage::handleAuthTypeChanged()
GenericLinuxDeviceConfigurationWizardFinalPage::GenericLinuxDeviceConfigurationWizardFinalPage(QWidget *parent) GenericLinuxDeviceConfigurationWizardFinalPage::GenericLinuxDeviceConfigurationWizardFinalPage(QWidget *parent)
: QWizardPage(parent), d(new Internal::GenericLinuxDeviceConfigurationWizardFinalPagePrivate) : QWizardPage(parent), d(new Internal::GenericLinuxDeviceConfigurationWizardFinalPagePrivate)
{ {
setTitle(tr("Setup Finished")); setTitle(tr("Summary"));
setSubTitle(QLatin1String(" ")); // For Qt bug (background color) setSubTitle(QLatin1String(" ")); // For Qt bug (background color)
d->infoLabel.setWordWrap(true); d->infoLabel.setWordWrap(true);
QVBoxLayout * const layout = new QVBoxLayout(this); QVBoxLayout * const layout = new QVBoxLayout(this);

View File

@@ -51,14 +51,12 @@ CheckoutWizardDialog::CheckoutWizardDialog(const QList<QWizardPage *> &parameter
m_progressPage(new CheckoutProgressWizardPage), m_progressPage(new CheckoutProgressWizardPage),
m_progressPageId(-1) m_progressPageId(-1)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
foreach (QWizardPage *wp, parameterPages) foreach (QWizardPage *wp, parameterPages)
addPage(wp); addPage(wp);
m_progressPageId = parameterPages.size(); m_progressPageId = parameterPages.size();
setPage(m_progressPageId, m_progressPage); setPage(m_progressPageId, m_progressPage);
connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(slotPageChanged(int))); connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(slotPageChanged(int)));
connect(m_progressPage, SIGNAL(terminated(bool)), this, SLOT(slotTerminated(bool))); connect(m_progressPage, SIGNAL(terminated(bool)), this, SLOT(slotTerminated(bool)));
Core::BaseFileWizard::setupWizard(this);
} }
void CheckoutWizardDialog::setTitle(const QString &title) void CheckoutWizardDialog::setTitle(const QString &title)