TextEditors: Move contentsChanged signal from editor to document

Change-Id: Ic935a8971705cb3238deda71aa2b5d19e4f62593
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2014-01-10 15:32:03 +01:00
parent ad4b589231
commit cfad9bdc3c
8 changed files with 13 additions and 17 deletions

View File

@@ -311,14 +311,12 @@ void QmlJSEditorPlugin::currentEditorChanged(Core::IEditor *editor)
newTextEditor = qobject_cast<QmlJSTextEditorWidget *>(editor->widget());
if (m_currentEditor) {
disconnect(m_currentEditor.data(), SIGNAL(contentsChanged()),
this, SLOT(checkCurrentEditorSemanticInfoUpToDate()));
disconnect(m_currentEditor.data(), SIGNAL(semanticInfoUpdated()),
this, SLOT(checkCurrentEditorSemanticInfoUpToDate()));
m_currentEditor->baseTextDocument()->disconnect(this);
m_currentEditor->disconnect(this);
}
m_currentEditor = newTextEditor;
if (newTextEditor) {
connect(newTextEditor, SIGNAL(contentsChanged()),
connect(newTextEditor->baseTextDocument(), SIGNAL(contentsChanged()),
this, SLOT(checkCurrentEditorSemanticInfoUpToDate()));
connect(newTextEditor, SIGNAL(semanticInfoUpdated()),
this, SLOT(checkCurrentEditorSemanticInfoUpToDate()));