Review Request: Move from KTabWidget to KTabBar tab switching by mouse wheel events.

David Faure faure at kde.org
Wed Sep 1 19:51:08 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5184/#review7354
-----------------------------------------------------------


Nice approach overall.


/trunk/KDE/kdelibs/kdeui/widgets/ktabbar.cpp
<http://svn.reviewboard.kde.org/r/5184/#comment7527>

    This if() seems wrong to me. I think this should still discard horizontal wheel events first (like in the old code), and then have a second if for "if there are receivers, then emit wheelDelta".



/trunk/KDE/kdelibs/kdeui/widgets/ktabbar.cpp
<http://svn.reviewboard.kde.org/r/5184/#comment7528>

    Qt/kdelibs coding style is to have the { on the same line as the if()  [even though the rest of this file might not do this consistently].



/trunk/KDE/kdelibs/kdeui/widgets/ktabbar.cpp
<http://svn.reviewboard.kde.org/r/5184/#comment7529>

    How could targetIndex be != from currentIndex(), after a call to setCurrentIndex(targetIndex)? This seems to be unnecessary, or to cover a corner case I can't think of (and in that case a comment is missing, at least).


- David


On 2010-09-01 16:25:53, David Palacio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5184/
> -----------------------------------------------------------
> 
> (Updated 2010-09-01 16:25:53)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> KTabWidget implements tab switching as response to mouse wheel events. This makes applications like Rekonq, that use a KTabBar instead, do nothing when the wheel is scrolled.
> 
> The proposed patch moves the behaviour implementation from KTabWidget to
> KTabBar, disables and disconnects the relevant signal in KTabBar/KTabWidget.
> 
> Note that QTabBar in Qt already implements this with a small difference: it
> does not wrap around the extreme tabs. That is, it will not go from the last to
> the first tab and viceversa.
> 
> 
> This addresses bug 248962.
>     https://bugs.kde.org/show_bug.cgi?id=248962
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kdeui/widgets/ktabbar.cpp 1170425 
>   /trunk/KDE/kdelibs/kdeui/widgets/ktabwidget.cpp 1170425 
> 
> Diff: http://svn.reviewboard.kde.org/r/5184/diff
> 
> 
> Testing
> -------
> 
> Rekonq works as expected.
> KTabWidget users, such as Konqueror and Konsole work as well.
> 
> 
> Thanks,
> 
> David
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100901/0aaede25/attachment.htm>


More information about the kde-core-devel mailing list