Review Request: Change signal mouseMiddleClick() to be emitted on release, not press of button

Friedrich W. H. Kossebau kossebau at
Wed Oct 21 18:47:06 BST 2009

This is an automatically generated e-mail. To reply, visit:

Review request for kdelibs.


KTabWidget currently emits the signal "mouseMiddleClick()" on press of the button, not on release. This does not match the behaviour of the similar signals "mouseMiddleClick( QWidget* )" and the one from KTabBar, "mouseMiddleClick( int )", which the former is based on, which both are emitted on release.

Attached patch fixes this, by emitting the signal "mouseMiddleClick()" only on the release of the button. The only class which seems to use this signal as per, KonqFrameTabs, is alright with this change in behaviour.

This change is also needed to make it possible to use the "mouseMiddleClick()" to create a new tab (like on a paste with the MMB) and the "mouseMiddleClick( QWidget* )" to close a tab. Currently, if the click is done on the empty space which will be used by the new tab, the tab is created on the press of the MMB and closed again on the release of the MMB. Thankfully one can see the flicker created by this, so the bug was quickly found... ;)


  trunk/KDE/kdelibs/kdeui/widgets/ktabwidget.h 1038713 
  trunk/KDE/kdelibs/kdeui/widgets/ktabwidget.cpp 1038713 




Friedrich W. H.

More information about the kde-core-devel mailing list