Don't call ConfigDialog::applyChanges() if nothing has changed
The OK button is always enabled, so it can be clicked when nothing is
modified on the current page. Calling page->apply()
and emitting
configSaved()
is useless and wasteful in this case.
One downside of this optimization is that if a change of some widget on
some ConfigPage
is not connected to that page's changed()
signal,
clicking OK button no longer saves that setting, unless another
"connected" widget on that page is also changed and the Apply button is
enabled. However such missing connection is problematic in other ways:
the Apply button does not become enabled; switching to a different
ConfigPage
silently discards a lone "unconnected" change. Therefore such
a bug can be fixed properly only by adding the missing connection.
!301 (merged) adds two missing connections. Hopefully all other widgets are "connected". If not, this optimization could reveal a bug, which would then be fixed.