aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmakeproject.cpp
diff options
context:
space:
mode:
authorDaniel Teske <[email protected]>2011-11-16 14:15:54 +0100
committerDaniel Teske <[email protected]>2011-11-16 17:47:47 +0100
commit97dc1d4ab47e98952deca8a3a0624466219b83ef (patch)
tree7ec1d09f3c3f5b4a92555cc0277c3f4eb2e91816 /src/plugins/cmakeprojectmanager/cmakeproject.cpp
parent20520dd073bd62d4e8d62ba9770904b4c489d00b (diff)
More robustness in reading .cbp files
Instead of choosing the first one, choose the most recently modified one. Also smallish fix to the title if no .cbp file exists Task-Number: QTCREATORBUG-6553 Task-Number: QTCREATORBUG-6532 Change-Id: I34e2d7ca6d8242356e92099ed29ca0f0a4a11574 Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeproject.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 596df19c836..59537b8c872 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -204,6 +204,11 @@ bool CMakeProject::parseCMakeLists()
CMakeBuildConfiguration *activeBC = activeTarget()->activeBuildConfiguration();
QString cbpFile = CMakeManager::findCbpFile(activeBC->buildDirectory());
+ if (cbpFile.isEmpty()) {
+ emit buildTargetsChanged();
+ return false;
+ }
+
// setFolderName
m_rootNode->setDisplayName(QFileInfo(cbpFile).completeBaseName());
CMakeCbpParser cbpparser;