Merge lp:~fboucault/unity-2d/remove_launcher_drag_drop_workaround_472 into lp:unity-2d/3.0

Proposed by Florian Boucault
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 580
Merged at revision: 580
Proposed branch: lp:~fboucault/unity-2d/remove_launcher_drag_drop_workaround_472
Merge into: lp:unity-2d/3.0
Diff against target: 29 lines (+1/-18)
1 file modified
launcher/ListViewDragAndDrop.qml (+1/-18)
To merge this branch: bzr merge lp:~fboucault/unity-2d/remove_launcher_drag_drop_workaround_472
Reviewer Review Type Date Requested Status
Olivier Tilloy (community) Approve
Review via email: mp+62954@code.launchpad.net

Description of the change

[launcher] Removed workaround necessary for Qt bug 15841 fixed in Qt 4.7.2

To post a comment you must log in.
Revision history for this message
Olivier Tilloy (osomon) wrote :

It feels good to remove workarounds :)

One remark: this means that running the trunk as is on Maverick won’t work. No big deal as we don’t officially support that combination anyway, but it would be nice to at least drop a note to Adi Roiban about the change (he maintains an unofficial PPA for the latest unity-2d on Maverick, see https://launchpad.net/~adiroiban/+archive/unity-2d-maverick).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/ListViewDragAndDrop.qml'
2--- launcher/ListViewDragAndDrop.qml 2011-05-26 15:35:07 +0000
3+++ launcher/ListViewDragAndDrop.qml 2011-05-31 09:18:50 +0000
4@@ -104,24 +104,7 @@
5 onExited: drop()
6 function reorder() {
7 if (draggedTileId != "" && tileAtCursorIndex != -1 && tileAtCursorIndex != draggedTileIndex) {
8- /* Workaround a bug in QML whereby moving an item down in
9- the list results in its visual representation being
10- shifted too far down by one index
11- (http://bugreports.qt.nokia.com/browse/QTBUG-15841).
12- Since the bug happens only when moving an item *down*,
13- and since moving an item one index down is strictly
14- equivalent to moving the item below one index up, we
15- achieve the same result by tricking the list model into
16- thinking that the mirror operation was performed.
17- Note: this bug will be fixed in Qt 4.7.2, at which point
18- this workaround can go away. */
19- if (tileAtCursorIndex > draggedTileIndex) {
20- items.move(tileAtCursorIndex, draggedTileIndex, 1)
21- } else {
22- /* This should be the only code path here, if it wasn’t
23- for the bug explained and worked around above. */
24- items.move(draggedTileIndex, tileAtCursorIndex, 1)
25- }
26+ items.move(draggedTileIndex, tileAtCursorIndex, 1)
27 draggedTileIndex = tileAtCursorIndex
28 }
29 }

Subscribers

People subscribed via source and target branches