Show button respecting what is declared by KCModule
ClosedPublic

Authored by bport on Jan 8 2020, 9:45 AM.

Diff Detail

Repository
R295 KCMUtils
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bport created this revision.Jan 8 2020, 9:45 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 8 2020, 9:45 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bport requested review of this revision.Jan 8 2020, 9:45 AM
meven added inline comments.Jan 8 2020, 9:52 AM
src/kcmultidialog.cpp
197–198

You can remove this line I think : no need to disable a hidden button, or enable a visible one.

ervin requested changes to this revision.Jan 8 2020, 10:09 AM
ervin added inline comments.
src/kcmultidialog.cpp
197–198

Well, I think I wouldn't temper with the setVisible of helpButton at all. Just to keep the behavior in line with systemsettings and keep the old behavior. This is not what this patch is supposed to change anyway.

This revision now requires changes to proceed.Jan 8 2020, 10:09 AM
bport added inline comments.Jan 8 2020, 10:12 AM
src/kcmultidialog.cpp
197–198

According to KCModule documentation Help button is shown only if needed
I can change documentation

bport updated this revision to Diff 73045.Jan 8 2020, 10:40 AM

Simplify code

ervin accepted this revision.Jan 8 2020, 10:45 AM
This revision is now accepted and ready to land.Jan 8 2020, 10:45 AM
This revision was automatically updated to reflect the committed changes.
wbauer added a subscriber: wbauer.Feb 16 2020, 12:25 PM

This change causes kontact to crash when opening its settings:
https://bugs.kde.org/show_bug.cgi?id=417396

wbauer added inline comments.Feb 16 2020, 1:35 PM
src/kcmultidialog.cpp
184

activeModule can be a nullptr here, as this is outside/after the if (activeModule).
This causes the kontact crash.

Possible fix: D27433