forked from qt-creator/qt-creator
Move displayName from IEditor to IDocument
The display name is not editor instance specific, but belongs to the document. Change-Id: I3c936f04a86e10e6ca30063d85036d85b4b5880e Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -535,7 +535,7 @@ void QmlEngine::gotoLocation(const Location &location)
|
||||
//Check if there are open editors with the same title
|
||||
QList<Core::IEditor *> editors = editorManager->openedEditors();
|
||||
foreach (Core::IEditor *ed, editors) {
|
||||
if (ed->displayName() == titlePattern) {
|
||||
if (ed->document()->displayName() == titlePattern) {
|
||||
editor = ed;
|
||||
break;
|
||||
}
|
||||
@@ -1301,7 +1301,7 @@ void QmlEngine::updateScriptSource(const QString &fileName, int lineOffset, int
|
||||
//Check if there are open editors with the same title
|
||||
QList<Core::IEditor *> editors = Core::EditorManager::instance()->openedEditors();
|
||||
foreach (Core::IEditor *editor, editors) {
|
||||
if (editor->displayName() == titlePattern) {
|
||||
if (editor->document()->displayName() == titlePattern) {
|
||||
updateEditor(editor, document);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user