aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@theqtcompany.com>2015-08-31 17:35:50 +0200
committerDaniel Teske <daniel.teske@theqtcompany.com>2015-09-01 13:37:21 +0000
commit0a1ad894d56eb22b2e6d2d2beea4641db9938283 (patch)
tree98503b54a0994076fa556d0741df2102f200d700
parenta80f4d179b5ef0dd8a149c96c08d56004f916a70 (diff)
CMake: Fix project tree displaying "." folders
Task-number: QTCREATORBUG-14994 Change-Id: Iea5a820083b8fc1974a749992f937965285370b6 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 8942b98879..586f484956 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -467,6 +467,8 @@ ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *
FileName path = rootNode->path().parentDir();
QDir rootParentDir(path.toString());
QString relativePath = rootParentDir.relativeFilePath(directory);
+ if (relativePath == QLatin1String("."))
+ relativePath.clear();
QStringList parts = relativePath.split(QLatin1Char('/'), QString::SkipEmptyParts);
ProjectExplorer::FolderNode *parent = rootNode;
foreach (const QString &part, parts) {