Wizards/Custom Wizards: Add code.

Task-number: QTCREATORBUG-423
This commit is contained in:
Friedemann Kleint
2010-03-12 11:20:32 +01:00
parent e82219b344
commit 1606cf1b33
15 changed files with 1484 additions and 5 deletions

View File

@@ -38,7 +38,6 @@
#include <coreplugin/icore.h>
#include <cpptools/cpptoolsconstants.h>
#include <extensionsystem/pluginmanager.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QVariant>
@@ -103,6 +102,11 @@ QString QtWizard::profileSuffix()
}
bool QtWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage)
{
return QtWizard::qt4ProjectPostGenerateFiles(w, l, errorMessage);
}
bool QtWizard::qt4ProjectPostGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage)
{
const QString proFileName = l.back().path();
const BaseQt4ProjectWizardDialog *dialog = qobject_cast<const BaseQt4ProjectWizardDialog *>(w);
@@ -144,6 +148,35 @@ bool QtWizard::showModulesPageForLibraries()
return true;
}
// ------------ CustomQt4ProjectWizard
CustomQt4ProjectWizard::CustomQt4ProjectWizard(const Core::BaseFileWizardParameters& baseFileParameters,
QObject *parent) :
ProjectExplorer::CustomProjectWizard(baseFileParameters, parent)
{
}
QWizard *CustomQt4ProjectWizard::createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const
{
BaseQt4ProjectWizardDialog *wizard = new BaseQt4ProjectWizardDialog(false, parent);
initProjectWizardDialog(wizard, defaultPath, extensionPages);
if (wizard->pageIds().contains(targetPageId))
qWarning("CustomQt4ProjectWizard: Unable to insert target page at %d", int(targetPageId));
wizard->addTargetsPage(QSet<QString>(), targetPageId);
return wizard;
}
bool CustomQt4ProjectWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage)
{
return QtWizard::qt4ProjectPostGenerateFiles(w, l, errorMessage);
}
void CustomQt4ProjectWizard::registerSelf()
{
ProjectExplorer::CustomWizard::registerFactory<CustomQt4ProjectWizard>(QLatin1String("qt4project"));
}
// ----------------- BaseQt4ProjectWizardDialog
BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage, QWidget *parent) :
ProjectExplorer::BaseProjectWizardDialog(parent),