diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-07-04 22:25:15 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-07-10 17:26:15 +0200 |
commit | 113c5600c909791ddfea3d424a41d982dcdda6b7 (patch) | |
tree | 33638a66c8cd6f6f9c376d1aba52e8fca862a887 /src/plugins/coreplugin/designmode.cpp | |
parent | 81eba6f9843179804ed2e53d490e718b12c04044 (diff) | |
download | qt-creator-113c5600c909791ddfea3d424a41d982dcdda6b7.tar.gz |
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>
Diffstat (limited to 'src/plugins/coreplugin/designmode.cpp')
-rw-r--r-- | src/plugins/coreplugin/designmode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/coreplugin/designmode.cpp b/src/plugins/coreplugin/designmode.cpp index a591d995fc..4173f73b00 100644 --- a/src/plugins/coreplugin/designmode.cpp +++ b/src/plugins/coreplugin/designmode.cpp @@ -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()); } |