forked from qt-creator/qt-creator
CMakeProjectManager: Match only on Cxx and C languages on import
This way Qt Creator won't be creating imported kits on every import. On Windows the language "RC" is not part of the kit languages and would always discard valid matching kits. Fixes: QTCREATORBUG-25069 Change-Id: Ib4ec323ebf514c82e5036f7d0123100a75f3ea10 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <projectexplorer/buildinfo.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
@@ -318,7 +319,10 @@ bool CMakeProjectImporter::matchKit(void *directoryData, const Kit *k) const
|
||||
if (data->qt.qt && QtSupport::QtKitAspect::qtVersionId(k) != data->qt.qt->uniqueId())
|
||||
return false;
|
||||
|
||||
const QList<Id> allLanguages = ToolChainManager::allLanguages();
|
||||
for (const ToolChainDescription &tcd : data->toolChains) {
|
||||
if (!Utils::contains(allLanguages, [&tcd](const Id& language) {return language == tcd.language;}))
|
||||
continue;
|
||||
ToolChain *tc = ToolChainKitAspect::toolChain(k, tcd.language);
|
||||
if (!tc || tc->compilerCommand() != tcd.compilerPath)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user