forked from qt-creator/qt-creator
TextEditors: Move contentsChanged signal from editor to document
Change-Id: Ic935a8971705cb3238deda71aa2b5d19e4f62593 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -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()),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user