Bug 282017 - KTabWidget::setAutomaticResizeTabs() and QTabWidget::setMovable() don't work well together, causing incorrect tab labeling
Summary: KTabWidget::setAutomaticResizeTabs() and QTabWidget::setMovable() don't work ...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: 4.7
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 265531 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-14 14:24 UTC by Eike Hein
Modified: 2012-01-19 21:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.4


Attachments
Unit test (1.23 KB, patch)
2011-09-22 17:15 UTC, Frank Reininghaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Hein 2011-09-14 14:24:03 UTC
KTabWidget::setTabReorderingEnabled() is marked deprecated these days, with the API docs recommending to use QTabWidget::setMovable() instead. However, KTabWidget appears to still maintain a local copy of the tab labels which is not updated when the user reorders tabs by dragging. When and when KTabWidget::setAutomaticResizeTabs() is enabled, this causes the tabs to be relabeled with the wrong labels when the tab labels move from being fully shown to being shown elided.

Bug 279693 shows this happening in the wild after David Faure ported Konversation to setMovable() in e8a7b459.
Comment 1 Eike Hein 2011-09-14 14:25:43 UTC
s/When and when/When/
Comment 2 Frank Reininghaus 2011-09-22 17:15:54 UTC
Created attachment 63860 [details]
Unit test

This unit test fails with current kdelibs 4.7 branch and passes with Christoph's patch from https://git.reviewboard.kde.org/r/102628/
Comment 3 Christoph Feck 2011-11-14 14:23:06 UTC
Git commit 92062021a65896b0d1990111a23942962dd6f7fe by Christoph Feck, on behalf of Frank Reininghaus.
Committed on 14/11/2011 at 15:20.
Pushed by cfeck into branch 'KDE/4.7'.

Unit test for KTabWidget bug

CCBUG: 282017

M  +20   -0    kdeui/tests/ktabwidget_unittest.cpp

http://commits.kde.org/kdelibs/92062021a65896b0d1990111a23942962dd6f7fe
Comment 4 Christoph Feck 2011-11-14 14:23:06 UTC
Git commit fc5f17480bd2d6b6708e4263d89cff7d3b7fc0c6 by Christoph Feck.
Committed on 14/11/2011 at 15:21.
Pushed by cfeck into branch 'KDE/4.7'.

Fix incorrect tab labels after reordering

BUG: 282017
FIXED-IN: 4.7.4
REVIEW: 102628

M  +13   -0    kdeui/widgets/ktabwidget.cpp
M  +4    -0    kdeui/widgets/ktabwidget.h

http://commits.kde.org/kdelibs/fc5f17480bd2d6b6708e4263d89cff7d3b7fc0c6
Comment 5 Dawit Alemayehu 2012-01-19 21:03:40 UTC
*** Bug 265531 has been marked as a duplicate of this bug. ***