commontk/CTK — comment on commit 4314c15836b87f2946665bda7e442ecd4593cb16
File: Libs/Widgets/ctkToolTipTrapper.h line 67
By finetjul:

The more I think about it, the more I think toolTipsWordWrapped is dangerous and not scalable. It has a side effect of "trapping" the tooltips.
and the following is odd:
setToolTipsWrapped(true)
// here tooltips are trapped (installEventFilter), but toolTipsTrapped() return false
setToolTipsWrapped(true) should internally call setToolTipsTrapped(true) then.
Code is duplicated, the installEventFitler and removeEventFitler are in 2 locations.
but the following would be counter intuitive:
setToolTipsTrapped(false)
setToolTipsWrapped(true)
-> now toolTipsTrapped() returns true, having the order of calls Trapped/Wrapped being important is a risk.

Also what happens when we'll add more features to the tooltiptrapper ? each option would have to install the event filter ? does not seem scalable.
So I would prevent toolTipsWordWrapped from installing the event filter, and let that work to toolTipsTrapped.

Jc, I wouldn't split the class in 2 . I believe the "wrap" feature is generic enough to be part of the "base" tooltip class.

Danielle, if you don't have time to work on the cleanup I can do it, let me know.