Utils: add FilePath::completeBaseName

Removing some FilePath::toFileInfo() calls again.

Change-Id: I6610beebf2c30754fde525b71f4c4a34ceb5e30b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-06-04 07:59:00 +02:00
parent 5544fd35c4
commit 5ec611b68e
24 changed files with 48 additions and 32 deletions

View File

@@ -195,7 +195,7 @@ GenericProject::GenericProject(const Utils::FilePath &fileName)
{
setId(Constants::GENERICPROJECT_ID);
setProjectLanguages(Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
setDisplayName(fileName.toFileInfo().completeBaseName());
setDisplayName(fileName.completeBaseName());
setBuildSystemCreator([](Target *t) { return new GenericBuildSystem(t); });
}
@@ -475,7 +475,7 @@ void GenericBuildSystem::refresh(RefreshOptions options)
if (options & Files) {
auto newRoot = std::make_unique<ProjectNode>(projectDirectory());
newRoot->setDisplayName(projectFilePath().toFileInfo().completeBaseName());
newRoot->setDisplayName(projectFilePath().completeBaseName());
// find the common base directory of all source files
FilePath baseDir = findCommonSourceRoot();