summary refs log tree commit diff
path: root/src/timeline/TimelineViewManager.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-11-09 04:58:19 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-11-09 04:59:06 +0100
commit485babba14485801f9835a27a2062d19ec126cc4 (patch)
treee6f450c8a4b2f579e96c0436c48d12c4515ab4f7 /src/timeline/TimelineViewManager.cpp
parentMerge pull request #1224 from Nheko-Reborn/settingsfromroomlist (diff)
downloadnheko-485babba14485801f9835a27a2062d19ec126cc4.tar.xz
Implement a completer for commands
fixes #429
Diffstat (limited to 'src/timeline/TimelineViewManager.cpp')
-rw-r--r--src/timeline/TimelineViewManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp

index 9c46d201..ed86414d 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp
@@ -12,6 +12,7 @@ #include "ChatPage.h" #include "CombinedImagePackModel.h" +#include "CommandCompleter.h" #include "CompletionProxyModel.h" #include "EventAccessors.h" #include "ImagePackListModel.h" @@ -443,6 +444,11 @@ TimelineViewManager::completerFor(const QString &completerName, const QString &r auto proxy = new CompletionProxyModel(stickerModel); stickerModel->setParent(proxy); return proxy; + } else if (completerName == QLatin1String("command")) { + static auto commandCompleter = new CommandCompleter(); + auto proxy = new CompletionProxyModel(commandCompleter); + commandCompleter->setParent(proxy); + return proxy; } return nullptr; }