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

@@ -142,7 +142,7 @@ CppEditorSupport::CppEditorSupport(CppModelManager *modelManager, BaseTextEditor
connect(m_updateEditorTimer, SIGNAL(timeout()),
this, SLOT(updateEditorNow()));
connect(m_textEditor, SIGNAL(contentsChanged()), this, SLOT(updateDocument()));
connect(m_textEditor->document(), SIGNAL(contentsChanged()), this, SLOT(updateDocument()));
connect(this, SIGNAL(diagnosticsChanged()), this, SLOT(onDiagnosticsChanged()));
connect(m_textEditor->document(), SIGNAL(mimeTypeChanged()),

View File

@@ -59,7 +59,7 @@ class CppCompletionAssistProvider;
* its document.
*
* The following steps are taken:
* 1. the text editor fires a contentsChanged() signal that triggers updateDocument
* 1. the text editor document fires a contentsChanged() signal that triggers updateDocument
* 2. update document will start a timer, or reset the timer if it was already running. This way
* subsequent updates (e.g. keypresses) get bunched together instead of running the subsequent
* actions for every key press