Skip to content
Snippets Groups Projects
Commit 0a1ad894 authored by Robert Loehning's avatar Robert Loehning Committed by Daniel Teske
Browse files

CMake: Fix project tree displaying "." folders


Task-number: QTCREATORBUG-14994
Change-Id: Iea5a820083b8fc1974a749992f937965285370b6
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent a80f4d17
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment