Centralize code that deals with ideal tool view actions in one class
ClosedPublic

Authored by apol on Oct 26 2016, 4:14 PM.

Details

Summary

Make it possible for to detect if the toolview widget is disabled

In such case, we show an asterisk by the button. We could do other
things such as changing the icon or such, but trying to minimize the noise.
Changing the tooltip accordingly could also make sense.

Test Plan

Manual testing, seems to just work

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol updated this revision to Diff 7680.Oct 26 2016, 4:14 PM
apol retitled this revision from to Centralize code that deals with ideal tool view actions in one class.
apol updated this object.
apol edited the test plan for this revision. (Show Details)
apol added a reviewer: KDevelop.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptOct 26 2016, 4:14 PM
brauch accepted this revision.Oct 26 2016, 4:18 PM
brauch added a reviewer: brauch.
brauch added a subscriber: brauch.

Looks good to me.

This revision is now accepted and ready to land.Oct 26 2016, 4:18 PM
antonanikin added inline comments.
sublime/idealbuttonbarwidget.cpp
37

Remove this?

kfunk requested changes to this revision.Oct 26 2016, 5:51 PM
kfunk added a reviewer: kfunk.
kfunk added a subscriber: kfunk.
kfunk added inline comments.
sublime/idealbuttonbarwidget.cpp
43

Nitpick: { in next line

60

Nitpick: { in next line

75

Nitpick: { in next line

81

Hmm, not sure I like the asterisk here. To me, an asterisk usually means: "This item was modified".

Can we find something better? Maybe use the disabled-mode of the icon (cf. QIcon::Mode)?

203

_widgetAction -> widgetAction

205

auto toolViewAction = ...

234–235

Dito

290

Dito

This revision now requires changes to proceed.Oct 26 2016, 5:51 PM
apol updated this revision to Diff 7685.Oct 26 2016, 11:13 PM
apol edited edge metadata.
apol marked 8 inline comments as done.

Use () instead of an *
Remove the action to button hash

apol added a comment.Oct 26 2016, 11:15 PM

Fixed issues.

kfunk accepted this revision.Oct 27 2016, 7:29 AM
kfunk edited edge metadata.

LGTM, way better than the asterisk.

debugger/framestack/framestackwidget.cpp
257

The initial state of that tool view is wrong; maybe needs a setEnabled(false) in the ctor?

This revision is now accepted and ready to land.Oct 27 2016, 7:29 AM
This revision was automatically updated to reflect the committed changes.