From a8cfda0ddb56bb87f79809eb7b523b1fcfe574e3 Mon Sep 17 00:00:00 2001 From: Roberto Raggi <roberto.raggi@nokia.com> Date: Mon, 2 Mar 2009 15:48:06 +0100 Subject: [PATCH] Introduced CppTools::EditorSupport::contentsChanged(). --- src/plugins/cpptools/cpptoolseditorsupport.cpp | 5 ++++- src/plugins/cpptools/cpptoolseditorsupport.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index 6527983b6ef..5eba9158e72 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -61,7 +61,8 @@ void CppEditorSupport::setTextEditor(TextEditor::ITextEditor *textEditor) if (! _textEditor) return; - connect(_textEditor, SIGNAL(contentsChanged()), this, SLOT(updateDocument())); + connect(_textEditor, SIGNAL(contentsChanged()), this, SIGNAL(contentsChanged())); + connect(this, SIGNAL(contentsChanged()), this, SLOT(updateDocument())); updateDocument(); } @@ -106,3 +107,5 @@ void CppEditorSupport::updateDocumentNow() } } + + diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h index e95a1962bdb..ef91da43e0e 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.h +++ b/src/plugins/cpptools/cpptoolseditorsupport.h @@ -63,6 +63,9 @@ public: QString contents(); +Q_SIGNALS: + void contentsChanged(); + private Q_SLOTS: void updateDocument(); void updateDocumentNow(); -- GitLab