forked from qt-creator/qt-creator
Core: Proliferate FilePath use a bit
Change-Id: I06c9a9875b0698e3ccab13a2f1136cdbcac621b3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1442,7 +1442,7 @@ IEditor *EditorManagerPrivate::createEditor(IEditorFactory *factory, const FileP
|
||||
connect(document, &IDocument::changed, d, [document] {
|
||||
d->handleDocumentStateChange(document);
|
||||
});
|
||||
emit m_instance->editorCreated(editor, filePath.toString());
|
||||
emit m_instance->editorCreated(editor, filePath);
|
||||
}
|
||||
|
||||
return editor;
|
||||
@@ -1531,7 +1531,7 @@ IEditor *EditorManagerPrivate::duplicateEditor(IEditor *editor)
|
||||
return nullptr;
|
||||
|
||||
IEditor *duplicate = editor->duplicate();
|
||||
emit m_instance->editorCreated(duplicate, duplicate->document()->filePath().toString());
|
||||
emit m_instance->editorCreated(duplicate, duplicate->document()->filePath());
|
||||
addEditor(duplicate);
|
||||
return duplicate;
|
||||
}
|
||||
|
@@ -154,7 +154,7 @@ signals:
|
||||
void currentEditorChanged(Core::IEditor *editor);
|
||||
void currentDocumentStateChanged();
|
||||
void documentStateChanged(Core::IDocument *document);
|
||||
void editorCreated(Core::IEditor *editor, const QString &fileName);
|
||||
void editorCreated(Core::IEditor *editor, const Utils::FilePath &filePath);
|
||||
void editorOpened(Core::IEditor *editor);
|
||||
void documentOpened(Core::IDocument *document);
|
||||
void editorAboutToClose(Core::IEditor *editor);
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -97,7 +97,7 @@ signals:
|
||||
void projectFinishedParsing(ProjectExplorer::Project *project);
|
||||
|
||||
private:
|
||||
static void configureEditor(Core::IEditor *editor, const QString &fileName);
|
||||
static void configureEditor(Core::IEditor *editor, const Utils::FilePath &filePath);
|
||||
static void configureEditors(Project *project);
|
||||
|
||||
static void registerProjectCreator(const QString &mimeType,
|
||||
|
@@ -228,9 +228,9 @@ QmlProfilerTool::QmlProfilerTool()
|
||||
QmlProfilerTextMarkModel *model = d->m_profilerModelManager->textMarkModel();
|
||||
if (EditorManager *editorManager = EditorManager::instance()) {
|
||||
connect(editorManager, &EditorManager::editorCreated,
|
||||
model, [this, model](Core::IEditor *editor, const QString &fileName) {
|
||||
model, [this, model](Core::IEditor *editor, const FilePath &filePath) {
|
||||
Q_UNUSED(editor)
|
||||
model->createMarks(d->m_viewContainer, fileName);
|
||||
model->createMarks(d->m_viewContainer, filePath.toString());
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user