| 54 | using ClangCodeCompletionItemTester = CodeCompletionItemTester<ClangCodeCompletionContext>; |
| 55 | |
| 56 | struct CompletionItems { |
| 57 | CompletionItems(){} |
| 58 | CompletionItems(const KTextEditor::Cursor& position, const QStringList& completions, |
| 59 | const QStringList& declarationItems = {}, const std::optional<QString>& code = std::nullopt) |
| 60 | : position(position) |
| 61 | , completions(completions) |
| 62 | , declarationItems(declarationItems) |
| 63 | , code(code){}; |
| 64 | KTextEditor::Cursor position; |
| 65 | QStringList completions; |
| 66 | QStringList declarationItems; ///< completion items that have associated declarations. Declarations with higher match quality at the top. @sa KTextEditor::CodeCompletionModel::MatchQuality |
| 67 | std::optional<QString> code; ///< If we expect the completion (not) to change the code, e.g., arrow-to-dot |
| 68 | }; |
| 69 | Q_DECLARE_TYPEINFO(CompletionItems, Q_MOVABLE_TYPE); |
| 70 | Q_DECLARE_METATYPE(CompletionItems) |
| 71 |
no outgoing calls