summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectexplorer.cpp
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@nokia.com>2012-05-14 18:55:30 +0200
committerJarek Kobus <jaroslaw.kobus@nokia.com>2012-07-03 14:01:17 +0200
commit5c04b408605d27377fc9d3991527b15aee4d8797 (patch)
treee4728491dc350687800813d03704969be7539461 /src/plugins/projectexplorer/projectexplorer.cpp
parente7993e20ec60fa362e07ae07e02531206f0b0a2a (diff)
downloadqt-creator-5c04b408605d27377fc9d3991527b15aee4d8797.tar.gz
Don't show the target setup page on adding a subproject
Task-number: QTCREATORBUG-7426 Change-Id: I69232c9cd924a701a5c7b48d124ed2319337ea02 Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Diffstat (limited to 'src/plugins/projectexplorer/projectexplorer.cpp')
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index dbc0fd66cb..27b77be91e 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -2597,6 +2597,12 @@ void ProjectExplorerPlugin::addNewFile()
QVariantMap map;
map.insert(QLatin1String(Constants::PREFERED_PROJECT_NODE), d->m_currentNode->projectNode()->path());
+ if (d->m_currentProject) {
+ QList<Core::Id> profileIds;
+ foreach (Target *target, d->m_currentProject->targets())
+ profileIds << target->id();
+ map.insert(QLatin1String(Constants::PROJECT_PROFILE_IDS), QVariant::fromValue(profileIds));
+ }
Core::ICore::showNewItemDialog(tr("New File", "Title of dialog"),
Core::IWizard::wizardsOfKind(Core::IWizard::FileWizard)
+ Core::IWizard::wizardsOfKind(Core::IWizard::ClassWizard),
@@ -2613,6 +2619,13 @@ void ProjectExplorerPlugin::addNewSubproject()
d->m_currentNode->projectNode()).contains(ProjectNode::AddSubProject)) {
QVariantMap map;
map.insert(QLatin1String(Constants::PREFERED_PROJECT_NODE), d->m_currentNode->projectNode()->path());
+ if (d->m_currentProject) {
+ QList<Core::Id> profileIds;
+ foreach (Target *target, d->m_currentProject->targets())
+ profileIds << target->id();
+ map.insert(QLatin1String(Constants::PROJECT_PROFILE_IDS), QVariant::fromValue(profileIds));
+ }
+
Core::ICore::showNewItemDialog(tr("New Subproject", "Title of dialog"),
Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard),
location, map);