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

@@ -201,7 +201,7 @@ void DesignMode::currentEditorChanged(Core::IEditor *editor)
bool mimeEditorAvailable = false;
if (editor && editor->document()) {
if (editor) {
const QString mimeType = editor->document()->mimeType();
if (!mimeType.isEmpty()) {
foreach (DesignEditorInfo *editorInfo, d->m_editors) {
@@ -220,7 +220,7 @@ void DesignMode::currentEditorChanged(Core::IEditor *editor)
}
}
if (d->m_currentEditor)
disconnect(d->m_currentEditor.data(), SIGNAL(changed()), this, SLOT(updateActions()));
disconnect(d->m_currentEditor.data()->document(), SIGNAL(changed()), this, SLOT(updateActions()));
if (!mimeEditorAvailable) {
setActiveContext(Context());
@@ -233,7 +233,7 @@ void DesignMode::currentEditorChanged(Core::IEditor *editor)
d->m_currentEditor = editor;
if (d->m_currentEditor)
connect(d->m_currentEditor.data(), SIGNAL(changed()), this, SLOT(updateActions()));
connect(d->m_currentEditor.data()->document(), SIGNAL(changed()), this, SLOT(updateActions()));
emit actionsUpdated(d->m_currentEditor.data());
}