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

Method applyChanges

kdevplatform/shell/configdialog.cpp:194–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192
193
194void ConfigDialog::applyChanges(ConfigPage* page)
195{
196 Q_ASSERT(m_currentPageHasChanges);
197 // must set this to false before calling apply, otherwise we get the confirmation dialog
198 // whenever we enable/disable plugins.
199 // This is because KPageWidget then emits currentPageChanged("Plugins", nullptr), which seems like a bug to me,
200 // it should rather emit currentPageChanged("Plugins", "Plugins") or even better nothing at all, since the current
201 // page did not actually change!
202 // TODO: fix KPageWidget
203 m_currentPageHasChanges = false;
204 m_currentlyApplyingChanges = true;
205 page->apply();
206 m_currentlyApplyingChanges = false;
207 Q_ASSERT(!m_currentPageHasChanges);
208 button(QDialogButtonBox::Apply)->setEnabled(false);
209 emit configSaved(page);
210}
211
212#include "moc_configdialog.cpp"

Callers

nothing calls this directly

Calls 3

buttonFunction · 0.85
applyMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected