Utils: add FilePath::baseName

Removing some FilePath::toFileInfo() calls

Change-Id: I49be2ef260f225e07b64ee8ace6a8cd47a9d8bb2
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-06-03 12:53:40 +02:00
parent d5ff8b1c24
commit 068873c9d5
13 changed files with 21 additions and 17 deletions

View File

@@ -792,7 +792,7 @@ void ClangdClient::Private::addSearchResultsForFile(ReferencesData &refData,
if (refData.search->supportsReplace()) {
const bool fileInSession = SessionManager::projectForFile(file);
item.setSelectForReplacement(fileInSession);
if (fileInSession && file.toFileInfo().baseName().compare(
if (fileInSession && file.baseName().compare(
refData.replacementData->oldSymbolName,
Qt::CaseInsensitive) == 0) {
refData.replacementData->fileRenameCandidates << file; // TODO: We want to do this only for types. Use SymbolInformation once we have it.