Change setting names

This commit is contained in:
Mm2PL 2023-02-13 23:21:03 +01:00
parent 96613690a9
commit cd919b01d5
3 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,7 @@ void PluginController::initialize(Settings &settings, Paths &paths)
(void)paths; (void)paths;
// actuallyInitialize will be called by this connection // actuallyInitialize will be called by this connection
settings.enableAnyPlugins.connect([this](bool enabled) { settings.pluginSupportEnabled.connect([this](bool enabled) {
if (enabled) if (enabled)
{ {
this->actuallyInitialize(); this->actuallyInitialize();
@ -41,7 +41,7 @@ void PluginController::initialize(Settings &settings, Paths &paths)
// this function exists to allow for connecting to enableAnyPlugins option // this function exists to allow for connecting to enableAnyPlugins option
void PluginController::actuallyInitialize() void PluginController::actuallyInitialize()
{ {
if (!getSettings()->enableAnyPlugins) if (!getSettings()->pluginSupportEnabled)
{ {
qCDebug(chatterinoLua) qCDebug(chatterinoLua)
<< "Loading plugins disabled via Setting, skipping"; << "Loading plugins disabled via Setting, skipping";
@ -292,7 +292,7 @@ QString PluginController::tryExecPluginCommand(const QString &commandName,
bool PluginController::isEnabled(const QString &codename) bool PluginController::isEnabled(const QString &codename)
{ {
if (!getSettings()->enableAnyPlugins) if (!getSettings()->pluginSupportEnabled)
{ {
return false; return false;
} }

View file

@ -527,9 +527,9 @@ public:
{"d", 1}, {"d", 1},
{"w", 1}}}; {"w", 1}}};
BoolSetting enableAnyPlugins = {"/plugins/load", false}; BoolSetting pluginSupportEnabled = {"/plugins/supportEnabled", false};
ChatterinoSetting<std::vector<QString>> enabledPlugins = { ChatterinoSetting<std::vector<QString>> enabledPlugins = {
"/plugins/enabled", {}}; "/plugins/enabledIds", {}};
private: private:
void updateModerationActions(); void updateModerationActions();

View file

@ -47,7 +47,7 @@ PluginsPage::PluginsPage()
groupLayout->addRow(description); groupLayout->addRow(description);
auto *box = this->createCheckBox("Enable plugins", auto *box = this->createCheckBox("Enable plugins",
getSettings()->enableAnyPlugins); getSettings()->pluginSupportEnabled);
QObject::connect(box, &QCheckBox::released, [this]() { QObject::connect(box, &QCheckBox::released, [this]() {
this->rebuildContent(); this->rebuildContent();
}); });