Improve ChatDocumentHandler handling of null properties

Improve ChatDocumentHandler handling of null properties
This commit is contained in:
James Graham
2023-11-04 14:43:31 +00:00
parent d1aac971bf
commit 2bfb2fa1f9
5 changed files with 67 additions and 7 deletions

View File

@@ -88,7 +88,7 @@ class ChatDocumentHandler : public QObject
* This is typically provided to a qml component to visualise the current
* completion results.
*/
Q_PROPERTY(CompletionModel *completionModel READ completionModel NOTIFY completionModelChanged)
Q_PROPERTY(CompletionModel *completionModel READ completionModel CONSTANT)
/**
* @brief The current room that the the text document is being handled for.
@@ -133,7 +133,6 @@ public:
Q_INVOKABLE void complete(int index);
void updateCompletions();
CompletionModel *completionModel() const;
[[nodiscard]] QColor mentionColor() const;
@@ -147,7 +146,6 @@ Q_SIGNALS:
void cursorPositionChanged();
void roomChanged();
void chatBarCacheChanged();
void completionModelChanged();
void selectionStartChanged();
void selectionEndChanged();
void errorColorChanged();