Utils: Replace FilePath::rootPath() by some isRootPath()

Keeps more context to make it host-independent later.

Change-Id: I0f8ad3e8794daa6324662847203200ae378d34b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-09-16 11:14:59 +02:00
parent eda8a4244f
commit 06334e1816
4 changed files with 12 additions and 13 deletions

View File

@@ -39,8 +39,8 @@ namespace ProjectExplorer {
QHash<QString, QIcon> DirectoryIcon::m_cache;
static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
const Utils::FilePath &directory,
const Utils::FilePath &overrideBaseDir,
const FilePath &directory,
const FilePath &overrideBaseDir,
const FolderNode::FolderNodeFactory &factory)
{
Utils::FilePath path = overrideBaseDir.isEmpty() ? folder->filePath() : overrideBaseDir;
@@ -48,7 +48,7 @@ static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
Utils::FilePath directoryWithoutPrefix;
bool isRelative = false;
if (path.isEmpty() || path == FilePath::rootPath()) {
if (path.isEmpty() || path.isRootPath()) {
directoryWithoutPrefix = directory;
isRelative = false;
} else {