feat: trigger completion of commands on the input of backlash / char

This commit is contained in:
Srevin Saju
2021-05-01 13:30:24 +03:00
parent ee595ed374
commit 6575d23072
4 changed files with 17 additions and 1 deletions

View File

@@ -27,6 +27,7 @@
#include "chatboxhelper.h"
#include "chatdocumenthandler.h"
#include "clipboard.h"
#include "commandmodel.h"
#include "controller.h"
#include "csapi/joining.h"
#include "csapi/leaving.h"
@@ -148,6 +149,11 @@ int main(int argc, char *argv[])
Q_UNUSED(engine2);
return new EmojiModel();
});
qmlRegisterSingletonType<CommandModel>("org.kde.neochat", 1, 0, "CommandModel", [](QQmlEngine *engine2, QJSEngine *scriptEngine) -> QObject * {
Q_UNUSED(scriptEngine);
Q_UNUSED(engine2);
return new CommandModel();
});
qmlRegisterType<SortFilterRoomListModel>("org.kde.neochat", 1, 0, "SortFilterRoomListModel");
qmlRegisterType<DevicesModel>("org.kde.neochat", 1, 0, "DevicesModel");
qmlRegisterUncreatableType<RoomMessageEvent>("org.kde.neochat", 1, 0, "RoomMessageEvent", "ENUM");