Bug 249706 - Window Behavior config dialog starts with the wrong page
Summary: Window Behavior config dialog starts with the wrong page
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: 4.5
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Bastian Senst
URL:
Keywords:
: 249827 252336 253023 253983 254022 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-09-01 08:05 UTC by András Manţia
Modified: 2010-10-13 17:15 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.5.3


Attachments
Screenshot (101.24 KB, image/png)
2010-10-06 05:03 UTC, Nicolas Bigaouette
Details

Note You need to log in before you can comment on or make changes to this bug.
Description András Manţia 2010-09-01 08:05:16 UTC
Right click on a titlebar, Configure Window Behavior. The first tab is Desktop Effects, and this is selected, but it starts with the Window Decoration page.
Happens both in 4.5.1 and trunk.
I filed against KWin as it doesn't happen inside systemsettings, where the pages are organized differently.
Comment 1 Christoph Feck 2010-09-01 13:03:16 UTC
To reproduce: "kcmshell4 clock style"

(NB: "You will be asked to authenticate before saving" starts non-bold, when clicking on "Date & Time", it gets bold)
Comment 2 Christoph Feck 2010-09-02 13:41:38 UTC
*** Bug 249827 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2010-09-25 15:31:05 UTC
*** Bug 252336 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2010-10-02 14:48:59 UTC
*** Bug 253023 has been marked as a duplicate of this bug. ***
Comment 5 Jay LaCroix 2010-10-05 21:38:25 UTC
This bug still exists in 4.5.2.
Comment 6 Nicolas Bigaouette 2010-10-06 05:03:45 UTC
Created attachment 52257 [details]
Screenshot

I'm hit with this issue on two machines running up to date Arch (kernel 2.6.35.7, Xorg 1.9, qt 4.7, xf86-video-intel 2.12) since 4.5.0. One laptop (GM965) and one netbook (GM945).

I'm attaching a screenshot, just in case.
Comment 7 Thomas Lübking 2010-10-12 17:09:49 UTC
*** Bug 253983 has been marked as a duplicate of this bug. ***
Comment 8 Bastian Senst 2010-10-12 20:14:24 UTC
Well, this seems to be a bug introduced in r1168413.
Here the a connection to the signal currentChanged() was changed the the signal selectionChanged(). Reverting the patch fixes it for me.
r1168413 fixes bug #163693

The bug mentioned in #163693 is not reproducable here.
I'd have to investigate a little more to find a solution fixing both problems.
Comment 9 Bastian Senst 2010-10-12 20:19:29 UTC
Added some guys from bug #163693
Perhaps you can help.
Comment 10 Christoph Feck 2010-10-13 02:14:49 UTC
*** Bug 254022 has been marked as a duplicate of this bug. ***
Comment 11 Bastian Senst 2010-10-13 13:39:35 UTC
The bug was intoduced due to the change of connecting to selectionChanged() instead of currentChanged().
“kcmshell4 clock style” adds first the clock page and inserts the style page before it.
QItemSelectionModel checks if the selection has been changed (by comparing the QModelIndexes), but nothing has been changed (still the first item is selected), so no selectionChanged() will be emitted (but currentChanged()).
Comment 12 Christoph Feck 2010-10-13 13:52:40 UTC
If I have items R,S,T, with S selected, and insert an item before R, then the list is now Q,R,S,T, but still S should be selected. Are you implying that now R would be selected, because it is still the second item?

Maybe someone forgot the begin/endInsertRows() calls in the underlying model.
Comment 13 Bastian Senst 2010-10-13 14:42:59 UTC
(In reply to comment #12)
> Maybe someone forgot the begin/endInsertRows() calls in the underlying model.

That's exactly how it seems to me at the moment. I'm currently working on this.
Comment 14 Bastian Senst 2010-10-13 15:40:51 UTC
SVN commit 1185487 by bholst:

Adding missing beginInsertRows() and endInsertRows() calls in KPageWidgetModel:
beginInsertRows() has to be called before inserting rows
and endInsertRows() has to be called after inserting rows in a subclass of QAbstractItemModel.

CCBUG: 249706


 M  +31 -1     kpagewidgetmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1185487
Comment 15 Bastian Senst 2010-10-13 17:13:39 UTC
SVN commit 1185518 by bholst:

Adding missing beginInsertRows() and endInsertRows() calls in KPageWidgetModel:
beginInsertRows() has to be called before inserting rows
and endInsertRows() has to be called after inserting rows in a subclass of
QAbstractItemModel.

CCBUG: 249706

Backport of r1185487


 M  +31 -1     kpagewidgetmodel.cpp  


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