diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2010-02-18 14:11:29 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2010-02-18 15:36:15 +0100 |
commit | 871d54657b0d6bc8c156e973c58a10275eb90dfc (patch) | |
tree | 363984fb57474e44b61f44624d45b35d45bdf8c3 /src/plugins/qt4projectmanager/projectloadwizard.cpp | |
parent | 06abd3b59dd0076916c4adb4b237fdf96ce433dc (diff) | |
download | qt-creator-871d54657b0d6bc8c156e973c58a10275eb90dfc.tar.gz |
Clean up qt4 projectloadwizard
Diffstat (limited to 'src/plugins/qt4projectmanager/projectloadwizard.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/projectloadwizard.cpp | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/plugins/qt4projectmanager/projectloadwizard.cpp b/src/plugins/qt4projectmanager/projectloadwizard.cpp index 7195223cdd..544b20af78 100644 --- a/src/plugins/qt4projectmanager/projectloadwizard.cpp +++ b/src/plugins/qt4projectmanager/projectloadwizard.cpp @@ -124,41 +124,20 @@ void ProjectLoadWizard::done(int result) // Import the existing stuff // qDebug()<<"Creating m_buildconfiguration entry from imported stuff"; // qDebug()<<((m_importBuildConfig& QtVersion::BuildAll)? "debug_and_release" : "")<<((m_importBuildConfig & QtVersion::DebugBuild)? "debug" : "release"); - bool debug = m_importBuildConfig & QtVersion::DebugBuild; - foreach (const QString &id, m_importVersion->supportedTargetIds()) { - Qt4Target *t(m_project->targetFactory()->create(m_project, id)); + Qt4Target *t(m_project->targetFactory()->create(m_project, id, QList<QtVersion*>() << m_importVersion)); if (!t) continue; - // Remove default BCs - foreach (ProjectExplorer::BuildConfiguration *bc, t->buildConfigurations()) - t->removeBuildConfiguration(bc); - - // ... and add our own! - t->addQt4BuildConfiguration(debug ? "Debug" : "Release", m_importVersion, m_importBuildConfig, m_additionalArguments); - if (m_importBuildConfig & QtVersion::BuildAll) { - // Also create the other configuration - QtVersion::QmakeBuildConfigs otherBuildConfiguration = m_importBuildConfig; - if (debug) - otherBuildConfiguration = otherBuildConfiguration & ~ QtVersion::DebugBuild; - else - otherBuildConfiguration = otherBuildConfiguration | QtVersion::DebugBuild; - - t->addQt4BuildConfiguration(debug ? "Release" : "Debug", m_importVersion, otherBuildConfiguration, m_additionalArguments); - } m_project->addTarget(t); } } else { // Not importing if (m_temporaryVersion) delete m_importVersion; - // Create default - bool buildAll = false; // Find a Qt version: - // TODO: Update the wizard to support targets properly. QList<QtVersion *> candidates = vm->versions(); - QtVersion *defaultVersion = candidates.at(0); + QtVersion *defaultVersion = candidates.at(0); // always there and always valid! foreach (QtVersion *v, candidates) { if (v->isValid()) defaultVersion = v; @@ -168,11 +147,8 @@ void ProjectLoadWizard::done(int result) } } - if (defaultVersion->isValid() && (defaultVersion->defaultBuildConfig() & QtVersion::BuildAll)) - buildAll = true; - foreach (const QString &id, defaultVersion->supportedTargetIds()) { - Qt4Target *t(m_project->targetFactory()->create(m_project, id)); + Qt4Target *t(m_project->targetFactory()->create(m_project, id, QList<QtVersion *>() << defaultVersion)); if (!t) continue; m_project->addTarget(t); |