| 192 | |
| 193 | |
| 194 | void 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" |
nothing calls this directly
no test coverage detected