From dbc3332b8e1442c0903e129586c08986ce752ff9 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 7 Feb 2012 15:09:08 +0100 Subject: C++: Moved completion/highlighting into the model manager. This way the editor does not need to know all the details of instantiating or maintaining classes for highlighting and/or completion, it can just ask the model manager. The change also enables different highlighting- or completion-engines without changes to the cppeditor. Change-Id: I8000d9d9fe446b292defddb2295493cf77d0f14a Reviewed-by: Leandro Melo --- src/plugins/cpptools/cpptoolseditorsupport.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/plugins/cpptools/cpptoolseditorsupport.h') diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h index 2c2199d00f..353dd7bdcd 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.h +++ b/src/plugins/cpptools/cpptoolseditorsupport.h @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -56,6 +57,10 @@ namespace TextEditor { } // namespace TextEditor namespace CppTools { + +class CppCompletionSupport; +class CppHighlightingSupport; + namespace Internal { class CppModelManager; @@ -77,6 +82,9 @@ public: QString contents(); unsigned editorRevision() const; + CppCompletionSupport *completionSupport() const; + CppHighlightingSupport *highlightingSupport() const; + Q_SIGNALS: void contentsChanged(); @@ -94,6 +102,8 @@ private: QFuture _documentParser; QString _cachedContents; unsigned _revision; + QScopedPointer m_completionSupport; + QScopedPointer m_highlightingSupport; }; } // namespace Internal -- cgit v1.2.1