Add SpellChecking to NeoChat

Fix #98
This commit is contained in:
Carl Schwan
2021-06-07 11:31:22 +02:00
parent 23bd73c499
commit 8f309ca958
5 changed files with 144 additions and 3 deletions

View File

@@ -11,6 +11,9 @@
#include <QTextDocument>
#include "neochatroom.h"
#ifndef Q_OS_ANDROID
#include "spellcheckhighlighter.h"
#endif
ChatDocumentHandler::ChatDocumentHandler(QObject *parent)
: QObject(parent)
@@ -34,6 +37,9 @@ void ChatDocumentHandler::setDocument(QQuickTextDocument *document)
m_document->textDocument()->disconnect(this);
}
m_document = document;
#ifndef Q_OS_ANDROID
new SpellcheckHighlighter(m_document->textDocument());
#endif
Q_EMIT documentChanged();
}