MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / update

Method update

src/settingsdialogplugins.cpp:184–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void PluginsSettingsTab::update()
185{
186 // transfer plugin settings to in-memory structure
187 for (int i = 0; i < ui->pluginsList->topLevelItemCount(); ++i) {
188 auto* topLevelItem = ui->pluginsList->topLevelItem(i);
189 for (int j = 0; j < topLevelItem->childCount(); ++j) {
190 auto* item = topLevelItem->child(j);
191 settings().plugins().setSettings(plugin(item)->name(),
192 item->data(0, SettingsRole).toMap());
193 }
194 }
195
196 // set plugin blacklist
197 QStringList names;
198 for (QListWidgetItem* item : ui->pluginBlacklist->findItems("*", Qt::MatchWildcard)) {
199 names.push_back(item->text());
200 }
201
202 settings().plugins().setBlacklist(names);
203
204 settings().plugins().save();
205}
206
207void PluginsSettingsTab::closing()
208{

Callers

nothing calls this directly

Calls 6

setSettingsMethod · 0.80
pluginsMethod · 0.80
setBlacklistMethod · 0.80
nameMethod · 0.45
dataMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected