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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user