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:
Eike Ziller
2013-07-04 22:25:15 +02:00
parent 81eba6f984
commit 113c5600c9
57 changed files with 177 additions and 325 deletions

View File

@@ -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;
}