forked from qt-creator/qt-creator
Make targetsetuppage work in customwizard
This commit is contained in:
@@ -438,10 +438,12 @@ bool CustomProjectWizard::postGenerateFiles(const QWizard *, const Core::Generat
|
||||
return CustomProjectWizard::postGenerateOpen(l, errorMessage);
|
||||
}
|
||||
|
||||
void CustomProjectWizard::introPageLeft(const QString &project, const QString & /* path */)
|
||||
void CustomProjectWizard::introPageLeft(const QString &project, const QString & path)
|
||||
{
|
||||
// Make '%ProjectName%' available in base replacements.
|
||||
context()->baseReplacements.insert(QLatin1String("ProjectName"), project);
|
||||
|
||||
emit projectLocationChanged(path + QChar('/') + project);
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
@@ -158,6 +158,9 @@ public:
|
||||
// the respective attributes set.
|
||||
static bool postGenerateOpen(const Core::GeneratedFiles &l, QString *errorMessage = 0);
|
||||
|
||||
signals:
|
||||
void projectLocationChanged(const QString &path);
|
||||
|
||||
protected:
|
||||
virtual bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
|
||||
|
||||
|
@@ -213,7 +213,7 @@ void BaseQt4ProjectWizardDialog::init(bool showModulesPage)
|
||||
if (showModulesPage)
|
||||
m_modulesPage = new ModulesPage;
|
||||
connect(this, SIGNAL(introPageLeft(QString,QString)),
|
||||
this, SLOT(propagateProjectName(QString,QString)));
|
||||
this, SLOT(generateProfileName(QString,QString)));
|
||||
}
|
||||
|
||||
int BaseQt4ProjectWizardDialog::addModulesPage(int id)
|
||||
@@ -233,7 +233,7 @@ int BaseQt4ProjectWizardDialog::addModulesPage(int id)
|
||||
int BaseQt4ProjectWizardDialog::addTargetSetupPage(QSet<QString> targets, bool mobile, int id)
|
||||
{
|
||||
m_targetSetupPage = new TargetSetupPage;
|
||||
connect(this, SIGNAL(proFileNameChanged(QString)),
|
||||
connect(this, SIGNAL(projectLocationChanged(QString)),
|
||||
m_targetSetupPage, SLOT(setProFilePath(QString)));
|
||||
|
||||
QList<TargetSetupPage::ImportInfo> infos = TargetSetupPage::importInfosForKnownQtVersions(0);
|
||||
@@ -315,10 +315,10 @@ bool BaseQt4ProjectWizardDialog::isTargetSelected(const QString &targetid) const
|
||||
return m_targetSetupPage->isTargetSelected(targetid);
|
||||
}
|
||||
|
||||
void BaseQt4ProjectWizardDialog::propagateProjectName(const QString &name, const QString &path)
|
||||
void BaseQt4ProjectWizardDialog::generateProfileName(const QString &name, const QString &path)
|
||||
{
|
||||
const QString proFile = QDir::fromNativeSeparators(path) + QChar('/') + name + QChar('/') + name + QLatin1String(".pro");
|
||||
emit proFileNameChanged(proFile);
|
||||
emit projectLocationChanged(proFile);
|
||||
}
|
||||
|
||||
QSet<QString> BaseQt4ProjectWizardDialog::desktopTarget()
|
||||
|
@@ -143,10 +143,10 @@ public:
|
||||
bool isTargetSelected(const QString &targetid) const;
|
||||
|
||||
signals:
|
||||
void proFileNameChanged(const QString &proFileName);
|
||||
void projectLocationChanged(const QString &proFileName);
|
||||
|
||||
private slots:
|
||||
void propagateProjectName(const QString &name, const QString &path);
|
||||
void generateProfileName(const QString &name, const QString &path);
|
||||
|
||||
private:
|
||||
inline void init(bool showModulesPage);
|
||||
|
Reference in New Issue
Block a user