forked from qt-creator/qt-creator
TextEditor: get CompletionAssistProvider from editor.
And not from the global object pool. This way, the editors that have different highlighters for various language dialects, or editors that support multiple languages in a single editor, can decide themselves on what CompletionAssistProvider to provide. Change-Id: Ieebc4a8e7b3de6470fdb8103035aa3b8b2ba6598 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
@@ -50,6 +50,8 @@ class ITextMark;
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
class CppCompletionAssistProvider;
|
||||
|
||||
/**
|
||||
* \brief The CppEditorSupport class oversees the actions that happen when a C++ text editor updates
|
||||
* its document.
|
||||
@@ -115,6 +117,8 @@ public:
|
||||
/// \param force do not check if the old semantic info is still valid
|
||||
void recalculateSemanticInfoDetached(bool force = false);
|
||||
|
||||
CppCompletionAssistProvider *completionAssistProvider() const;
|
||||
|
||||
signals:
|
||||
void documentUpdated();
|
||||
void diagnosticsChanged();
|
||||
@@ -189,6 +193,9 @@ private:
|
||||
unsigned m_lastHighlightRevision;
|
||||
QFuture<TextEditor::HighlightingResult> m_highlighter;
|
||||
QScopedPointer<CppTools::CppHighlightingSupport> m_highlightingSupport;
|
||||
|
||||
// Completion:
|
||||
QScopedPointer<CppCompletionAssistProvider> m_completionAssistProvider;
|
||||
};
|
||||
|
||||
} // namespace CppTools
|
||||
|
||||
Reference in New Issue
Block a user