IWizard->IWizardFactory

Start at splitting up the wizard functionality a bit. Currently
it is a factory but also contains a lot of logic that is invoked by
the real wizard dialogs.

This change renames/moves a couple of things only.

Change-Id: I1fa114ee3ee262f7c0690841f361bbf09e674725
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2014-05-02 17:38:42 +02:00
parent ca41557613
commit a8e8910130
35 changed files with 182 additions and 181 deletions

View File

@@ -97,7 +97,7 @@ static inline QString wizardDisplayCategory()
// A wizard that quickly creates a scratch buffer
// based on a temporary file without prompting for a path.
class ScratchFileWizard : public Core::IWizard
class ScratchFileWizard : public Core::IWizardFactory
{
Q_OBJECT
@@ -110,7 +110,7 @@ public:
setId(QLatin1String("Z.ScratchFile"));
setCategory(QLatin1String(wizardCategoryC));
setDisplayCategory(wizardDisplayCategory());
setFlags(Core::IWizard::PlatformIndependent);
setFlags(Core::IWizardFactory::PlatformIndependent);
}
void runWizard(const QString &, QWidget *, const QString &, const QVariantMap &)
@@ -143,13 +143,13 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
TextFileWizard *wizard = new TextFileWizard(QLatin1String(Constants::C_TEXTEDITOR_MIMETYPE_TEXT),
QLatin1String("text$"));
wizard->setWizardKind(Core::IWizard::FileWizard);
wizard->setWizardKind(Core::IWizardFactory::FileWizard);
wizard->setDescription(tr("Creates a text file. The default file extension is <tt>.txt</tt>. "
"You can specify a different extension as part of the filename."));
wizard->setDisplayName(tr("Text File"));
wizard->setCategory(QLatin1String(wizardCategoryC));
wizard->setDisplayCategory(wizardDisplayCategory());
wizard->setFlags(Core::IWizard::PlatformIndependent);
wizard->setFlags(Core::IWizardFactory::PlatformIndependent);
// Add text file wizard
addAutoReleasedObject(wizard);