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.
s/When and when/When/
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/
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
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
*** Bug 265531 has been marked as a duplicate of this bug. ***