diff options
author | Marco Bubke <marco.bubke@theqtcompany.com> | 2016-02-01 14:51:01 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@theqtcompany.com> | 2016-02-01 14:01:35 +0000 |
commit | c903f4974f3ed403b1cc4af4f143922d8ebc7961 (patch) | |
tree | 8212fe73b701edd3826b8972c76913beec197e4c /src/plugins/fakevim | |
parent | e42bf6ebc637e9ef4ec95787374c9743eb80d8d4 (diff) |
TextEditor: Introduce AssistProposalItemInterface
For unit test we need to break every dependency to the TextEditor
Widget etc.. With an abstract interface we can implement it in clang
without relying on unwanted dependencies. It makes it also easier to
compute the values deferred.
Change-Id: I1b313a1625f4e80bd324ab4bf1a7c4f6b690abe9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r-- | src/plugins/fakevim/fakevimplugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index b7f903e89c..259efa97ba 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -915,7 +915,7 @@ private: QString m_needle; }; -class FakeVimAssistProposalItem : public AssistProposalItem +class FakeVimAssistProposalItem final : public AssistProposalItem { public: FakeVimAssistProposalItem(const FakeVimCompletionAssistProvider *provider) @@ -948,7 +948,7 @@ private: class FakeVimAssistProposalModel : public GenericProposalModel { public: - FakeVimAssistProposalModel(const QList<AssistProposalItem *> &items) + FakeVimAssistProposalModel(const QList<AssistProposalItemInterface *> &items) { loadContent(items); } @@ -976,7 +976,7 @@ public: tc.setPosition(interface->position()); tc.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor); - QList<AssistProposalItem *> items; + QList<AssistProposalItemInterface *> items; QSet<QString> seen; QTextDocument::FindFlags flags = QTextDocument::FindCaseSensitively; while (1) { |