Bug 205293 - KSelectAction doesn't set tooltip nor WhatsThis help in requested combo box
Summary: KSelectAction doesn't set tooltip nor WhatsThis help in requested combo box
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: 4.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-27 07:30 UTC by Daniel Calviño Sánchez
Modified: 2010-09-01 12:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.5.2


Attachments
Unit tests for the bug (8.53 KB, patch)
2009-08-27 07:40 UTC, Daniel Calviño Sánchez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Calviño Sánchez 2009-08-27 07:30:41 UTC
Version:            (using Devel)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    Compiled sources

When KSelectAction is in combo box mode and a widget is requested, neither tooltip nor what's this help are set in the returned KComboBox. However, in menu mode, the returned QToolButton has the same tooltip and what's this help than the KSelectAction.

Moreover, if tooltip or what's this help are updated in the KSelectAction after the QToolButton is returned, tooltip and what's this help are also updated in the QToolButton. However, no update happens in the tooltip and what's this help of the KComboBox.

Tooltip and what's this help in the returned KComboBox should behave like they do in the returned QToolButton, that is, they should be the same as the tooltip and what's this help in the KSelectAction, getting updated when the KSelectAction ones are updated.
Comment 1 Daniel Calviño Sánchez 2009-08-27 07:40:00 UTC
Created attachment 36483 [details]
Unit tests for the bug

Here are the "unit" tests that show the bug in combo box mode and verifies that menu mode works as it should.

The first test checks, in combo box mode, that the tooltip of the returned widget is the same as the tooltip of the KSelectAction. The second test checks, in combo box mode, that if the tooltip is updated in KSelectAction after returning a widget, the tooltip of the widget is also updated. The third and fourth tests check the same, but in menu mode.

The last four tests are equivalent to the first four, but checking what's this help instead of tooltip.
Comment 2 David Faure 2010-09-01 01:24:07 UTC
Wow a bug report with unittest. I'll take care of it.
Comment 3 David Faure 2010-09-01 12:56:22 UTC
SVN commit 1170535 by dfaure:

Fixed KSelectAction not setting the tooltip+whatsthis+statustip on the widgets it creates.
Thanks to Daniel Calviño Sánchez for the extensive unittests!
FIXED-IN: 4.5.2
BUG: 205293

Also removed the hacks from r908643, they are not necessary anymore, QWidgetAction takes care of it
  (and if not, then the right place would have been in kselectaction, definitely not in kcombobox...).
Added test for disabling in the unittests.
CCMAIL: kossebau@kde.org


 M  +25 -3     actions/kselectaction.cpp  
 M  +2 -0      actions/kselectaction.h  
 M  +1 -0      tests/CMakeLists.txt  
 A             tests/kselectaction_unittest.cpp   [License: LGPL (v2+)]
 A             tests/kselectaction_unittest.h   [License: LGPL (v2+)]
 M  +1 -9      widgets/kcombobox.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170535