KConfigDialogManager::changedMap is deprecated since KF 5.32. This commit mimics the replacement commit from Okteta:
- Group Reviewers
- R334:4da724769b1f: Replace deprecated KConfigDialogManager::changedMap with property in the class…
Compiles. It seems that Equation editor behavior does not change.
|39 ↗||(On Diff #69085)|
Q_PROPERTY are ignored if the class doesn't have a Q_OBJECT
which this one doesn't have.
Once you add the Q_OBJECT marked, it stops compiling because document() doesn't return a QString.
Which brings me the question of, what was that KConfigDialogManager line doing?
Did we even need it?
EquationEdit != EquationEditWidget
You rather want to add a NOTIFY textEdited to the property definition of text for class EquationEdit, at https://phabricator.kde.org/source/kmplot/browse/master/kmplot/equationedit.h$52 :)
Re: "Did we even need it?": EquationEdit is used with ui files for kcfgx-based settings UI, so making KConfigDialogManager aware of the property change signal is needed to update config editing status (e.g. to enable Apply/Ok buttons).
See e.g. https://phabricator.kde.org/source/kmplot/browse/master/kmplot/editcoords.ui
Unfortunately the code for that EquationEdit seems to be a bit terrible, but that's a different story :D
Open the View -> Coordinate system dialog and see how apply is enabled (when it should not)
Now click apply and give the focus to the first edit and see how apply becomes reenabled :(
Anyhow, i guess we can commit this, since that's not a regression.