Konfigurator: Avoid needing to apply `setWhatsThis()` and `setToolTip()` before calling `createSpinBox()`
ClosedPublic

Authored by asensi on May 8 2020, 9:20 PM.

Details

Summary

Modify createSpinBox(...) in order to require a QLabel as an argument,
therefore applying setWhatsThis(toolTip) and setToolTip() to
that QLabel is done automatically (and that step does not have to
be remembered by developers).

Test Plan

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asensi requested review of this revision.May 8 2020, 9:20 PM
asensi created this revision.

It this code review is accepted, I'll add similar code but for widgets which are not spinBoxes.

All fine, but hints are not shown on labels on mouse-over; only context help does (see inline).

krusader/Konfigurator/konfiguratorpage.cpp
99

without

label->setToolTop(toolTip);

the help will be shown only on item and not on its label, like WhatsThis command does; it's really optional.

asensi updated this revision to Diff 82391.May 9 2020, 6:28 PM
asensi retitled this revision from Konfigurator: Avoid needing to apply `setWhatsThis(toolTip)` before calling `createSpinBox()` to Konfigurator: Avoid needing to apply `setWhatsThis()` and `setToolTip()` before calling `createSpinBox()`.
asensi edited the summary of this revision. (Show Details)

Add the setToolTip()calling , so hints are also shown on labels on mouse-over .

asensi marked an inline comment as done.May 9 2020, 6:32 PM
asensi added inline comments.
krusader/Konfigurator/konfiguratorpage.cpp
99

All right, let hints be also shown on labels on mouse-over :-)

gengisdave accepted this revision.May 10 2020, 11:42 AM

Tested on all spinboxes, no problems found

This revision is now accepted and ready to land.May 10 2020, 11:42 AM
asensi updated this revision to Diff 82456.May 10 2020, 7:36 PM
asensi marked an inline comment as done.

Two lines were also removed.

gengisdave accepted this revision.May 10 2020, 7:42 PM
This revision was automatically updated to reflect the committed changes.