MCPcopy Create free account
hub / github.com/KDE/kdevelop / onPageChanged

Method onPageChanged

kdevplatform/shell/configdialog.cpp:173–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void ConfigDialog::onPageChanged()
174{
175 QObject* from = sender();
176 if (from && from != currentPage()->widget()) {
177 qCWarning(SHELL) << "Settings in config page" << from << "changed, while" << currentPage()->widget() << "is currently selected. This case is not implemented yet.";
178 return;
179 // TODO: add a QHash<ConfigPage*, bool> as a member to make sure the apply button is always correct
180
181 // TODO: when pressing okay show confirm dialog if other pages have changed or just silently apply every page? "Items on other pages have changed, do you wish to review those changes? + list with changed pages."
182 }
183 if (!m_currentlyApplyingChanges) {
184 // e.g. PluginPreferences emits changed() from its apply method, better fix this here than having to
185 // ensure that no plugin emits changed() from apply()
186 // together with KPageDialog emitting currentPageChanged("Plugins", nullptr) this could cause a crash
187 // when we dereference before
188 m_currentPageHasChanges = true;
189 button(QDialogButtonBox::Apply)->setEnabled(true);
190 }
191}
192
193
194void ConfigDialog::applyChanges(ConfigPage* page)

Callers

nothing calls this directly

Calls 3

buttonFunction · 0.85
widgetMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected