Core: Proliferate FilePath use a bit

Change-Id: I06c9a9875b0698e3ccab13a2f1136cdbcac621b3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-07-25 11:38:22 +02:00
parent d8deb81e3f
commit 3f79a077e8
5 changed files with 8 additions and 9 deletions

View File

@@ -520,12 +520,11 @@ Project *ProjectManager::projectWithProjectFilePath(const FilePath &filePath)
[&filePath](const Project *p) { return p->projectFilePath() == filePath; });
}
void ProjectManager::configureEditor(IEditor *editor, const QString &fileName)
void ProjectManager::configureEditor(IEditor *editor, const FilePath &filePath)
{
if (auto textEditor = qobject_cast<TextEditor::BaseTextEditor*>(editor)) {
Project *project = projectForFile(Utils::FilePath::fromString(fileName));
// Global settings are the default.
if (project)
if (Project *project = projectForFile(filePath))
project->editorConfiguration()->configureEditor(textEditor);
}
}