mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-10 21:09:13 +00:00
qml: fix hang in ChatView by processing text explicitly (#2543)
Fixes #2519 Signed-off-by: Adam Treat <treat.adam@gmail.com> Signed-off-by: Jared Van Bortel <jared@nomic.ai> Co-authored-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
@@ -96,6 +96,7 @@ public:
|
||||
QQuickTextDocument* textDocument() const;
|
||||
void setTextDocument(QQuickTextDocument* textDocument);
|
||||
|
||||
Q_INVOKABLE void setValue(const QString &value);
|
||||
Q_INVOKABLE bool tryCopyAtPosition(int position) const;
|
||||
|
||||
bool shouldProcessText() const;
|
||||
@@ -119,12 +120,11 @@ private Q_SLOTS:
|
||||
void handleMarkdown();
|
||||
|
||||
private:
|
||||
QQuickTextDocument *m_textDocument;
|
||||
QQuickTextDocument *m_quickTextDocument;
|
||||
SyntaxHighlighter *m_syntaxHighlighter;
|
||||
QVector<ContextLink> m_links;
|
||||
QVector<CodeCopy> m_copies;
|
||||
bool m_shouldProcessText = false;
|
||||
bool m_isProcessingText = false;
|
||||
qreal m_fontPixelSize;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user