forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
b192d18e04
commit
4896bb41e9
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user