Editor: always configured assistant

A code assistant is not usable without a text editor widget and is
always created as part of one, so make the dependency obvious by require
it in the construction of the code assistant. This removes a bunch of
functions and cheks.

Change-Id: I96556430082ff729d99d2ae2516599f9b8cbc704
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2022-11-10 14:38:34 +01:00
parent be3a781581
commit f297b3f1b5
3 changed files with 7 additions and 31 deletions

View File

@@ -20,11 +20,9 @@ class CodeAssistant : public QObject
Q_OBJECT
public:
CodeAssistant();
CodeAssistant(TextEditorWidget *editorWidget);
~CodeAssistant() override;
void configure(TextEditorWidget *editorWidget);
void process();
void notifyChange();
bool hasContext() const;