Commit 44aaec76 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Simplify cmakeproject code a bit

No behavior change is intended in this patch.

Change-Id: I5c49a0a97ede443dbb25bf34b96c346a63f549d2
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent 420d9548
...@@ -204,8 +204,11 @@ void CMakeProject::parseCMakeOutput() ...@@ -204,8 +204,11 @@ void CMakeProject::parseCMakeOutput()
{ {
auto cmakeBc = qobject_cast<CMakeBuildConfiguration *>(sender()); auto cmakeBc = qobject_cast<CMakeBuildConfiguration *>(sender());
QTC_ASSERT(cmakeBc, return); QTC_ASSERT(cmakeBc, return);
if (!activeTarget() || activeTarget()->activeBuildConfiguration() != cmakeBc)
Target *t = activeTarget();
if (!t || t->activeBuildConfiguration() != cmakeBc)
return; return;
Kit *k = t->kit();
BuildDirManager *bdm = cmakeBc->buildDirManager(); BuildDirManager *bdm = cmakeBc->buildDirManager();
QTC_ASSERT(bdm, return); QTC_ASSERT(bdm, return);
...@@ -219,7 +222,7 @@ void CMakeProject::parseCMakeOutput() ...@@ -219,7 +222,7 @@ void CMakeProject::parseCMakeOutput()
createGeneratedCodeModelSupport(); createGeneratedCodeModelSupport();
ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(cmakeBc->target()->kit()); ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (!tc) { if (!tc) {
emit fileListChanged(); emit fileListChanged();
return; return;
...@@ -230,7 +233,7 @@ void CMakeProject::parseCMakeOutput() ...@@ -230,7 +233,7 @@ void CMakeProject::parseCMakeOutput()
CppTools::ProjectPartBuilder ppBuilder(pinfo); CppTools::ProjectPartBuilder ppBuilder(pinfo);
CppTools::ProjectPart::QtVersion activeQtVersion = CppTools::ProjectPart::NoQt; CppTools::ProjectPart::QtVersion activeQtVersion = CppTools::ProjectPart::NoQt;
if (QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(cmakeBc->target()->kit())) { if (QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k)) {
if (qtVersion->qtVersion() < QtSupport::QtVersionNumber(5,0,0)) if (qtVersion->qtVersion() < QtSupport::QtVersionNumber(5,0,0))
activeQtVersion = CppTools::ProjectPart::Qt4; activeQtVersion = CppTools::ProjectPart::Qt4;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment