aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/qtkitinformation.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-05-06 14:55:34 +0200
committerEike Ziller <eike.ziller@qt.io>2019-05-07 13:24:24 +0000
commit534fcfcd455731ca17c773ab943636d25bf1fb0d (patch)
tree3d74c2a2dd1809e81596bbc3df6f044e6fa54adf /src/plugins/qtsupport/qtkitinformation.cpp
parentda472ced46f313673f4a0cba80d5908cf08505e0 (diff)
Fix Qt version for auto-detected kits
Fixes a regression in d4565be6557fca844dcf4bf427e0ff9c0838df50 that leads to all desktop Kits being assigned a default desktop Qt version, even though the installer registered these kits with a specific Qt. Implementations of KitAspect::setup may not unconditionally override an existing value, since it is called on the kits restored from the install settings. This is needed because the installer registers toolchains and debuggers by referring to them via an ABI ("this kit has a debugger that can handle this specific ABI"), since the installer doesn't know e.g. about installed MSVC toolchains itself. That's why ToolChainKitAspect and DebuggerKitAspect may modify an existing value in their "setup" method. If this should be moved somewhere else, e.g. "fix", should be investigated, but in a separate refactoring. Change-Id: Ibd99e4da03cd7130c49294f4ac79cd8e346fb1b7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qtsupport/qtkitinformation.cpp')
-rw-r--r--src/plugins/qtsupport/qtkitinformation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qtsupport/qtkitinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp
index 3cd0b2d36b7..dfa58e91a20 100644
--- a/src/plugins/qtsupport/qtkitinformation.cpp
+++ b/src/plugins/qtsupport/qtkitinformation.cpp
@@ -163,6 +163,8 @@ QtKitAspect::QtKitAspect()
void QtKitAspect::setup(ProjectExplorer::Kit *k)
{
+ if (!k || k->hasValue(id()))
+ return;
const Abi tcAbi = ToolChainKitAspect::targetAbi(k);
const Core::Id deviceType = DeviceTypeKitAspect::deviceTypeId(k);