ProjectManagers: Detect Qt by kit for code-model update

Change-Id: Idf5f8233e4457bb22437d442732432acf0ce313e
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-04-21 09:08:07 +03:00
committed by Orgad Shaneh
parent b192d18e04
commit 4896bb41e9
3 changed files with 35 additions and 0 deletions

View File

@@ -317,6 +317,16 @@ bool CMakeProject::parseCMakeLists()
CppTools::ProjectInfo pinfo(this);
CppTools::ProjectPartBuilder ppBuilder(pinfo);
CppTools::ProjectPart::QtVersion activeQtVersion = CppTools::ProjectPart::NoQt;
if (QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k)) {
if (qtVersion->qtVersion() < QtSupport::QtVersionNumber(5,0,0))
activeQtVersion = CppTools::ProjectPart::Qt4;
else
activeQtVersion = CppTools::ProjectPart::Qt5;
}
ppBuilder.setQtVersion(activeQtVersion);
foreach (const CMakeBuildTarget &cbt, m_buildTargets) {
// This explicitly adds -I. to the include paths
QStringList includePaths = cbt.includeFiles;