New project wizard: Make it clearer that it is added as a subproject

Task-number: QTCREATORBUG-5936
Change-Id: If06f69184f2e2754c630c7b015c78b40a9278dc1
Reviewed-on: http://codereview.qt.nokia.com/3806
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
This commit is contained in:
Daniel Teske
2011-08-29 15:31:33 +02:00
parent 57520c44ea
commit d6c089e311
3 changed files with 9 additions and 0 deletions

View File

@@ -417,6 +417,7 @@ void ProjectFileWizardExtension::initProjectChoices(const QString &generatedProj
m_context->page->setProjects(projectChoices);
m_context->page->setProjectToolTips(projectToolTips);
m_context->page->setAddingSubProject(projectAction == ProjectNode::AddSubProject);
}
bool ProjectFileWizardExtension::processFiles(

View File

@@ -79,6 +79,13 @@ void ProjectWizardPage::setProjectToolTips(const QStringList &t)
m_projectToolTips = t;
}
void ProjectWizardPage::setAddingSubProject(bool addingSubProject)
{
m_ui->projectLabel->setText(addingSubProject ?
tr("Add as a subproject to project:")
: tr("Add to &project:"));
}
int ProjectWizardPage::currentProjectIndex() const
{
return m_ui->projectComboBox->currentIndex();

View File

@@ -68,6 +68,7 @@ public:
// Returns the common path
void setFilesDisplay(const QString &commonPath, const QStringList &files);
void setAddingSubProject(bool addingSubProject);
protected:
virtual void changeEvent(QEvent *e);