diff options
author | Tobias Hunger <tobias.hunger@gmx.de> | 2011-09-15 13:30:54 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2011-09-23 14:02:59 +0200 |
commit | ffa88df344ef9a92631f4e8a5e6a0255874ca298 (patch) | |
tree | 019a9f156a7968083b46eb35e7cce7087936108c /src/plugins/qt4projectmanager/qt4target.cpp | |
parent | 971512b39c7c90e5bd5dfb6a73bd6d4513e0f8ca (diff) | |
download | qt-creator-ffa88df344ef9a92631f4e8a5e6a0255874ca298.tar.gz |
Toolchain: Allow all tool chains
Allow all tool chains if either the Qt version is invalid or
no Qt modules are not selected.
Change-Id: I9842c30aca0a8752915548dc258f257c3fd39e4d
Reviewed-on: http://codereview.qt-project.org/4990
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/qt4projectmanager/qt4target.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt4target.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index bbeadfa9be..b5e7922c12 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -37,6 +37,7 @@ #include "qmakestep.h" #include "qt4project.h" #include "qt4basetargetfactory.h" +#include "qt4nodes.h" #include "qt4projectconfigwidget.h" #include "qt4projectmanagerconstants.h" #include "qt4buildconfiguration.h" @@ -263,9 +264,21 @@ QList<ProjectExplorer::ToolChain *> Qt4BaseTarget::possibleToolChains(ProjectExp QList<ProjectExplorer::ToolChain *> result; Qt4BuildConfiguration *qt4bc = qobject_cast<Qt4BuildConfiguration *>(bc); - if (!qt4bc || !qt4bc->qtVersion() || !qt4bc->qtVersion()->isValid()) + if (!qt4bc || !qt4bc->qtVersion()) return tmp; + QList<Qt4ProFileNode *> profiles = qt4Project()->allProFiles(); + bool qtUsed = false; + foreach (Qt4ProFileNode *pro, profiles) { + if (!pro->variableValue(QtVar).isEmpty()) { + qtUsed = true; + break; + } + } + + if (!qtUsed || !qt4bc->qtVersion()->isValid()) + return ProjectExplorer::ToolChainManager::instance()->toolChains(); + QList<ProjectExplorer::Abi> abiList = qt4bc->qtVersion()->qtAbis(); foreach (const ProjectExplorer::Abi &abi, abiList) tmp.append(ProjectExplorer::ToolChainManager::instance()->findToolChains(abi)); |