Bug 308101 - all Activities switcher thumbnails are the same; no new Activity can be selected
Summary: all Activities switcher thumbnails are the same; no new Activity can be selected
Status: RESOLVED FIXED
Alias: None
Product: Active
Classification: Plasma
Component: Contour activity switcher (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR major
Target Milestone: unscheduled
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-09 00:08 UTC by Carl Symons
Modified: 2012-10-10 22:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Symons 2012-10-09 00:08:21 UTC
created several new Activities. Activity spinner shows the same grey veined image for all Activities. Activities are not named in the thumbnails. No Activities can be selected. 

Reproducible: Always

Steps to Reproduce:
1. create Activity
2. operate Activity switcher
3. attempt to select different Activities
Actual Results:  
one Activity is displayed regardless of Activity selected.
every Activity thumbnail is the same grey veined image.

Expected Results:  
Activity thumbnails are shown and can be selected

Installed PA3 Mer RC2 image. Let system run for a while without doing anything. Powered down and back up. Spun the Activity switcher; no appropriate thumbnails. Added 3 new Activities; adding process went as expected. But still no thumbnails or ability to switch. Recycled 3 times; same behavior.
Comment 1 Thomas Pfeiffer 2012-10-09 08:25:16 UTC
I can confirm this with RC1 and updates from last night. Definitely a blocker :(
Comment 2 Aaron J. Seigo 2012-10-09 08:48:34 UTC
i can replicate this on my test build on the laptop as well. looking into it now... (and i have a suspicion as to what it might be)
Comment 3 Aaron J. Seigo 2012-10-09 09:22:03 UTC
Git commit b7f490bd6b6e0d12d60573b4316e2931b0dc51f0 by Aaron Seigo.
Committed on 09/10/2012 at 11:17.
Pushed by aseigo into branch 'KDE/4.9'.

dataengine based models set their roles when setting the data, so respond to that

syncRoleNames is fast (and faster now that we check that the role names actually changed)
but it may be nicer to find a more efficient way in future than checking the role names
on all / any data changes. in fact, the documentation for QAbstractItemModel::setRoleNames says:

"This function must be called before the model is used.
 Modifying the role names after the model has been set may result in undefined behaviour."

M  +5    -5    plasma/declarativeimports/core/datamodel.cpp

http://commits.kde.org/kde-runtime/b7f490bd6b6e0d12d60573b4316e2931b0dc51f0
Comment 4 Aaron J. Seigo 2012-10-09 09:22:03 UTC
Git commit 88463eabb8c45c91778f5d97991467e08dc28a53 by Aaron Seigo.
Committed on 09/10/2012 at 11:17.
Pushed by aseigo into branch 'master'.

dataengine based models set their roles when setting the data, so respond to that

syncRoleNames is fast (and faster now that we check that the role names actually changed)
but it may be nicer to find a more efficient way in future than checking the role names
on all / any data changes. in fact, the documentation for QAbstractItemModel::setRoleNames says:

"This function must be called before the model is used.
 Modifying the role names after the model has been set may result in undefined behaviour."

M  +5    -5    plasma/declarativeimports/core/datamodel.cpp

http://commits.kde.org/kde-runtime/88463eabb8c45c91778f5d97991467e08dc28a53
Comment 5 Aaron J. Seigo 2012-10-09 09:30:41 UTC
Git commit 67ed4501818386fb16f9e31dda496514382133d4 by Aaron Seigo.
Committed on 09/10/2012 at 11:29.
Pushed by aseigo into branch 'KDE/4.9'.

turns out we have to set the role names constantly to make sorting actually work

even just setting the sort/filter roles is not enough. role names must also be set again!
gaaaah. thankfully this seems to be very fast, though would still be nice to avoid it if
possible somehow.

M  +3    -3    plasma/declarativeimports/core/datamodel.cpp

http://commits.kde.org/kde-runtime/67ed4501818386fb16f9e31dda496514382133d4
Comment 6 Aaron J. Seigo 2012-10-09 09:30:41 UTC
Git commit d0592b7b151d808feac25f791060060fe63a610d by Aaron Seigo.
Committed on 09/10/2012 at 11:29.
Pushed by aseigo into branch 'master'.

turns out we have to set the role names constantly to make sorting actually work

even just setting the sort/filter roles is not enough. role names must also be set again!
gaaaah. thankfully this seems to be very fast, though would still be nice to avoid it if
possible somehow.

M  +3    -3    plasma/declarativeimports/core/datamodel.cpp

http://commits.kde.org/kde-runtime/d0592b7b151d808feac25f791060060fe63a610d
Comment 7 Marco Martin 2012-10-09 12:16:50 UTC
the no name problem should have been fixed a while ago,
the other problems fixed by above aaron's commits
Comment 8 Carl Symons 2012-10-10 16:38:55 UTC
Still working the same way in RC3. Not fixed.
Comment 9 Thomas Pfeiffer 2012-10-10 17:22:48 UTC
Same here with RC1 and updates from today. The problem persists.
Comment 10 Marco Martin 2012-10-10 18:26:36 UTC
the problem is in SortFilterModel because removing it makes the thumbnails back

don't know why with the same revision it doesn't happen on a desktop devel machine as well
Comment 11 Marco Martin 2012-10-10 18:50:44 UTC
ok, false alarm, sorry.

the problem was that rc3 still has old kde-runtime
it's now rebuilding
Comment 12 Carl Symons 2012-10-10 22:32:47 UTC
original RC3 PLUS zypper refresh and zypper up solves the problem.