Use RichText text input to provide real mentions

This use internally now a QTextDocument and a new C++ class to
manipulate the document with QTextCursor.
This commit is contained in:
Carl Schwan
2020-11-26 14:25:30 +00:00
parent d6e1a6a45b
commit d6ab6bacdd
5 changed files with 380 additions and 85 deletions

View File

@@ -40,6 +40,7 @@
#include "userdirectorylistmodel.h"
#include "userlistmodel.h"
#include "neochatconfig.h"
#include "chatdocumenthandler.h"
using namespace Quotient;
@@ -81,6 +82,7 @@ int main(int argc, char *argv[])
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Clipboard", &clipboard);
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Config", config);
qmlRegisterType<AccountListModel>("org.kde.neochat", 1, 0, "AccountListModel");
qmlRegisterType<ChatDocumentHandler>("org.kde.neochat", 1, 0, "ChatDocumentHandler");
qmlRegisterType<RoomListModel>("org.kde.neochat", 1, 0, "RoomListModel");
qmlRegisterType<UserListModel>("org.kde.neochat", 1, 0, "UserListModel");
qmlRegisterType<MessageEventModel>("org.kde.neochat", 1, 0, "MessageEventModel");