[DrKonqi] Avoid duplicate "Help" button
ClosedPublic

Authored by broulik on Feb 26 2016, 1:38 PM.

Details

Summary

For some reason I got two "Help" buttons in the crash report assistand, one of which didn't work.

It seems KAssistantDialog adds a help button by default or merely accessing it creates one?

Test Plan

Just one Help button and that one works

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 2471.Feb 26 2016, 1:38 PM
broulik retitled this revision from to [DrKonqi] Avoid duplicate "Help" button.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, dfaure.
broulik set the repository for this revision to R120 Plasma Workspace.
broulik added a project: Plasma.
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptFeb 26 2016, 1:38 PM
broulik updated this object.Feb 26 2016, 1:41 PM
dfaure edited edge metadata.Feb 27 2016, 10:53 AM

Yes, KAssistantDialog says

buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Help);

If you then call addButton(Help) you get another one.

I do wonder if KAssistantDialog should be doing this indeed. It means it offers a button that does nothing, by default, and just hopes that the app will connect to it.

https://git.reviewboard.kde.org/r/123939/ added this button, but I think it would have been better to let the apps do it. But now we can't take it out again, code that calls button(Help) would get a null pointer and crash...

davidedmundson accepted this revision.Feb 27 2016, 3:57 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Feb 27 2016, 3:57 PM
This revision was automatically updated to reflect the committed changes.