aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmakeprojectmanager
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-12-16 14:39:29 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2019-12-16 15:15:38 +0000
commit9feabb7ba326a77dd06af654a1f70b8345a74a4d (patch)
tree9416b59cd24239a9d916533a5e7dbe224c64965b /src/plugins/qmakeprojectmanager
parent9c5798fec9ef7d809af03ef3779aed19ad3e61ed (diff)
QmakeKitAspect: Leave the toolchains alone
The QmakeKitAspect's purpose is to let the user force a specific mkspec when building with qmake. It is unexpected that it silently changes the kit's toolchains. The code that automatically sets up a Qt version for a given toolchain already exists in QtKitAspect and appears to work just fine these days. Fixes: QTCREATORBUG-23191 Change-Id: I2727a4faa2285738d0e81e8558ca02e97ef319d3 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/qmakeprojectmanager')
-rw-r--r--src/plugins/qmakeprojectmanager/qmakekitinformation.cpp45
-rw-r--r--src/plugins/qmakeprojectmanager/qmakekitinformation.h1
2 files changed, 0 insertions, 46 deletions
diff --git a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp
index 95b7c8eb5bb..75ecbdf9aec 100644
--- a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp
@@ -107,51 +107,6 @@ Tasks QmakeKitAspect::validate(const Kit *k) const
return result;
}
-void QmakeKitAspect::setup(Kit *k)
-{
- QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
- if (!version)
- return;
-
- // HACK: Ignore Boot2Qt kits!
- if (version->type() == "Boot2Qt.QtVersionType" || version->type() == "Qdb.EmbeddedLinuxQt")
- return;
-
- QString spec = QmakeKitAspect::mkspec(k);
- if (spec.isEmpty())
- spec = version->mkspec();
-
- ToolChain *tc = ToolChainKitAspect::toolChain(k, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
-
- if (!tc || (!tc->suggestedMkspecList().empty() && !tc->suggestedMkspecList().contains(spec))) {
- const QList<ToolChain *> possibleTcs = ToolChainManager::toolChains(
- [version](const ToolChain *t) {
- return t->isValid()
- && t->language() == Core::Id(ProjectExplorer::Constants::CXX_LANGUAGE_ID)
- && version->qtAbis().contains(t->targetAbi());
- });
- if (!possibleTcs.isEmpty()) {
- const QList<ToolChain *> goodTcs = Utils::filtered(possibleTcs,
- [&spec](const ToolChain *t) {
- return t->suggestedMkspecList().contains(spec);
- });
- // Hack to prefer a tool chain from PATH (e.g. autodetected) over other matches.
- // This improves the situation a bit if a cross-compilation tool chain has the
- // same ABI as the host.
- const Environment systemEnvironment = Environment::systemEnvironment();
- ToolChain *bestTc = Utils::findOrDefault(goodTcs,
- [&systemEnvironment](const ToolChain *t) {
- return systemEnvironment.path().contains(t->compilerCommand().parentDir());
- });
- if (!bestTc) {
- bestTc = goodTcs.isEmpty() ? possibleTcs.last() : goodTcs.last();
- }
- if (bestTc)
- ToolChainKitAspect::setAllToolChainsToMatch(k, bestTc);
- }
- }
-}
-
KitAspectWidget *QmakeKitAspect::createConfigWidget(Kit *k) const
{
return new Internal::QmakeKitAspectWidget(k, this);
diff --git a/src/plugins/qmakeprojectmanager/qmakekitinformation.h b/src/plugins/qmakeprojectmanager/qmakekitinformation.h
index 1de908396f9..ebedf85ef0a 100644
--- a/src/plugins/qmakeprojectmanager/qmakekitinformation.h
+++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.h
@@ -38,7 +38,6 @@ public:
QmakeKitAspect();
ProjectExplorer::Tasks validate(const ProjectExplorer::Kit *k) const override;
- void setup(ProjectExplorer::Kit *k) override;
ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;