diff --git a/src/controllers/plugins/PluginController.hpp b/src/controllers/plugins/PluginController.hpp index b672cf9d1..c9e9757fe 100644 --- a/src/controllers/plugins/PluginController.hpp +++ b/src/controllers/plugins/PluginController.hpp @@ -79,6 +79,16 @@ public: return true; } + std::set listRegisteredCommands() + { + std::set out; + for (const auto &[name, _] : this->ownedCommands) + { + out.insert(name); + } + return out; + } + private: QDir loadDirectory_; lua_State *state_; diff --git a/src/widgets/settingspages/PluginsPage.cpp b/src/widgets/settingspages/PluginsPage.cpp index 7b195f74f..a333e3c91 100644 --- a/src/widgets/settingspages/PluginsPage.cpp +++ b/src/widgets/settingspages/PluginsPage.cpp @@ -83,6 +83,18 @@ void PluginsPage::rebuildContent() } pl->addRow("Used libraries", libs); + QString cmds; + for (const auto &cmdName : plugin->listRegisteredCommands()) + { + if (!cmds.isEmpty()) + { + cmds += ", "; + } + + cmds += cmdName; + } + pl->addRow("Commands", new QLabel(cmds)); + auto *reload = new QPushButton("Reload"); QObject::connect(reload, &QPushButton::pressed, [name = codename, this]() {