TextEditor: introduce text suggestion interface

And also a copilot suggestion implementing that interface that allows
reverting all changes done to a suggestion as well as applying it.

Change-Id: I236c1fc5e5844d19ac606672af54e273e9c42e1c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
David Schulz
2023-03-27 07:28:48 +02:00
parent 1ee46580ac
commit 8a1e34f084
10 changed files with 190 additions and 147 deletions

View File

@@ -37,6 +37,7 @@ class SyntaxHighlighter;
class TabSettings;
class TextDocumentPrivate;
class TextMark;
class TextSuggestion;
class TypingSettings;
using TextMarks = QList<TextMark *>;
@@ -145,6 +146,7 @@ public:
const std::function<Utils::FilePath()> &filePath);
void insertSuggestion(const QString &text, const QTextCursor &cursor);
void insertSuggestion(std::unique_ptr<TextSuggestion> &&suggestion);
#ifdef WITH_TESTS
void setSilentReload();