From cd919b01d5c6006668c7c7da5b8bd1221f331efa Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Mon, 13 Feb 2023 23:21:03 +0100 Subject: [PATCH] Change setting names --- src/controllers/plugins/PluginController.cpp | 6 +++--- src/singletons/Settings.hpp | 4 ++-- src/widgets/settingspages/PluginsPage.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/plugins/PluginController.cpp b/src/controllers/plugins/PluginController.cpp index 018d40643..febe8367a 100644 --- a/src/controllers/plugins/PluginController.cpp +++ b/src/controllers/plugins/PluginController.cpp @@ -25,7 +25,7 @@ void PluginController::initialize(Settings &settings, Paths &paths) (void)paths; // actuallyInitialize will be called by this connection - settings.enableAnyPlugins.connect([this](bool enabled) { + settings.pluginSupportEnabled.connect([this](bool enabled) { if (enabled) { this->actuallyInitialize(); @@ -41,7 +41,7 @@ void PluginController::initialize(Settings &settings, Paths &paths) // this function exists to allow for connecting to enableAnyPlugins option void PluginController::actuallyInitialize() { - if (!getSettings()->enableAnyPlugins) + if (!getSettings()->pluginSupportEnabled) { qCDebug(chatterinoLua) << "Loading plugins disabled via Setting, skipping"; @@ -292,7 +292,7 @@ QString PluginController::tryExecPluginCommand(const QString &commandName, bool PluginController::isEnabled(const QString &codename) { - if (!getSettings()->enableAnyPlugins) + if (!getSettings()->pluginSupportEnabled) { return false; } diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 4adc419e1..0ac8ac05e 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -527,9 +527,9 @@ public: {"d", 1}, {"w", 1}}}; - BoolSetting enableAnyPlugins = {"/plugins/load", false}; + BoolSetting pluginSupportEnabled = {"/plugins/supportEnabled", false}; ChatterinoSetting> enabledPlugins = { - "/plugins/enabled", {}}; + "/plugins/enabledIds", {}}; private: void updateModerationActions(); diff --git a/src/widgets/settingspages/PluginsPage.cpp b/src/widgets/settingspages/PluginsPage.cpp index 918279025..c7b5a544e 100644 --- a/src/widgets/settingspages/PluginsPage.cpp +++ b/src/widgets/settingspages/PluginsPage.cpp @@ -47,7 +47,7 @@ PluginsPage::PluginsPage() groupLayout->addRow(description); auto *box = this->createCheckBox("Enable plugins", - getSettings()->enableAnyPlugins); + getSettings()->pluginSupportEnabled); QObject::connect(box, &QCheckBox::released, [this]() { this->rebuildContent(); });