diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2012-02-07 15:09:08 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2012-02-08 14:30:14 +0100 |
commit | dbc3332b8e1442c0903e129586c08986ce752ff9 (patch) | |
tree | ec9b94df1464e6693c09fb6638a38a7095722386 /src/plugins/cpptools/cpptoolseditorsupport.h | |
parent | b64d103bfbe5fea3283e8a3c014f4a48dca3c482 (diff) | |
download | qt-creator-dbc3332b8e1442c0903e129586c08986ce752ff9.tar.gz |
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 <leandro.melo@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.h')
-rw-r--r-- | src/plugins/cpptools/cpptoolseditorsupport.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 <QtCore/QObject> #include <QtCore/QPointer> #include <QtCore/QFuture> +#include <QtCore/QScopedPointer> #include <QtCore/QSharedPointer> #include <QtGui/QTextCursor> @@ -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<void> _documentParser; QString _cachedContents; unsigned _revision; + QScopedPointer<CppCompletionSupport> m_completionSupport; + QScopedPointer<CppHighlightingSupport> m_highlightingSupport; }; } // namespace Internal |