1 | /* |
---|---|
2 | SPDX-FileCopyrightText: KDE Developers |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #include "completion.h" |
8 | #include "katepartdebug.h" |
9 | |
10 | using namespace KateVi; |
11 | |
12 | Completion::Completion(const QString &completedText, bool removeTail, CompletionType completionType) |
13 | : m_completedText(completedText) |
14 | , m_removeTail(removeTail) |
15 | , m_completionType(completionType) |
16 | { |
17 | if (m_completionType == FunctionWithArgs || m_completionType == FunctionWithoutArgs) { |
18 | qCDebug(LOG_KTE) << "Completing a function while not removing tail currently unsupported; will remove tail instead"; |
19 | m_removeTail = true; |
20 | } |
21 | } |
22 | |
23 | QString Completion::completedText() const |
24 | { |
25 | return m_completedText; |
26 | } |
27 | |
28 | bool Completion::removeTail() const |
29 | { |
30 | return m_removeTail; |
31 | } |
32 | |
33 | Completion::CompletionType Completion::completionType() const |
34 | { |
35 | return m_completionType; |
36 | } |
37 |