Make setHelp() public
AbandonedPublic

Authored by yurchor on Dec 16 2018, 12:23 PM.

Details

Reviewers
None
Group Reviewers
Frameworks
Summary

Sometimes it is useful to connect configuration dialogs directly with the corresponding section in the manual (KmPlot, KAnagram). It was easy before KF 5:

m_settingsDialog->setHelp("configuration", QLatin1String("kmplot"));

but now setHelp is protected and this is an untrivial task.

Test Plan

The code just moved to public slots, should work as expected.

Diff Detail

Repository
R265 KConfigWidgets
Lint
Lint Skipped
Unit
Unit Tests Skipped
yurchor created this revision.Dec 16 2018, 12:23 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 16 2018, 12:23 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
yurchor requested review of this revision.Dec 16 2018, 12:23 PM
elvisangelaccio added inline comments.
src/kconfigdialog.h
176

If I'm not mistaken, moving a function from protected to public breaks the ABI

aacid added a subscriber: aacid.Dec 16 2018, 6:07 PM

You can always just use QMetaObject::invokeMethod it's a bit lame, but slots are never really non-public if you use the metaobject system

src/kconfigdialog.h
176
yurchor abandoned this revision.Dec 16 2018, 6:19 PM

Abandoned due to the policy violation. Despite of the handful help pages invocation, it is obvious that this change will never happen.

Just a side note: the protected method is useless and can be removed without loss of any functionality because all known setHelp()'s are commented now with hopeless messages like "TODO: port to kf5".

aacid added a comment.Dec 16 2018, 6:29 PM

Abandoned due to the policy violation. Despite of the handful help pages invocation, it is obvious that this change will never happen.

Just a side note: the protected method is useless and can be removed without loss of any functionality because all known setHelp()'s are commented now with hopeless messages like "TODO: port to kf5".

Yuri, you keep doing aggressive comments like this, your patches are interesting, but honestly i don't know if for me it's worthwhile helping you, if every so often you complain about how much everything is broken when it is not.

Of course the method is not useless, this method is trivially usable by just having a class that inherits from KConfigDialog like Okular and i'm sure lots of other apps do.

Abandoned due to the policy violation. Despite of the handful help pages invocation, it is obvious that this change will never happen.

Just a side note: the protected method is useless and can be removed without loss of any functionality because all known setHelp()'s are commented now with hopeless messages like "TODO: port to kf5".

Yuri, you keep doing aggressive comments like this, your patches are interesting, but honestly i don't know if for me it's worthwhile helping you, if every so often you complain about how much everything is broken when it is not.

Of course the method is not useless, this method is trivially usable by just having a class that inherits from KConfigDialog like Okular and i'm sure lots of other apps do.

Ok. Sorry. Thanks for the useful clarification. Please do not help me. You need not to do so.

There may be another way: add a new public method which wraps the protected one, and when moving to KF6 a) make setHelp public and b) deprecate the new wrapper. I think - suggestions needed