on xenial help sign in
Pass the correct number of arguments to mapToItem
2a50fd8Albert Astals Cid
qml/Launcher/LauncherPanel.qml+1−1
@@ -758,7 +758,7 @@ Rectangle {
758 }
758 }
759
759
760 // internal
760 // internal
761− property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) + quickList.item.offset : units.gu(1)
761+ property int itemCenter: item ? root.mapFromItem(quickList.item, 0, 0).y + (item.height / 2) + quickList.item.offset : units.gu(1)
762 property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
762 property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
763 itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
763 itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
764
764
tests/qmltests/Stages/tst_PhoneStage.qml+2−2
@@ -272,7 +272,7 @@ Item {
272 var tile = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(data.index));
272 var tile = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(data.index));
273 var appId = ApplicationManager.get(data.index).appId;
273 var appId = ApplicationManager.get(data.index).appId;
274
274
275− if (tile.mapToItem(spreadView).x > spreadView.width) {
275+ if (tile.mapToItem(spreadView, 0, 0).x > spreadView.width) {
276 // Item is not visible... Need to flick the spread
276 // Item is not visible... Need to flick the spread
277 var startX = phoneStage.width - units.gu(1);
277 var startX = phoneStage.width - units.gu(1);
278 var startY = phoneStage.height / 2;
278 var startY = phoneStage.height / 2;
@@ -286,7 +286,7 @@ Item {
286
286
287 console.log("clicking app", data.index, "(", appId, ")")
287 console.log("clicking app", data.index, "(", appId, ")")
288 tryCompare(tile, "swipeToCloseEnabled", true);
288 tryCompare(tile, "swipeToCloseEnabled", true);
289− mouseClick(spreadView, tile.mapToItem(spreadView).x + units.gu(1), spreadView.height / 2)
289+ mouseClick(spreadView, tile.mapToItem(spreadView, 0, 0).x + units.gu(1), spreadView.height / 2)
290 tryCompare(ApplicationManager, "focusedApplicationId", appId);
290 tryCompare(ApplicationManager, "focusedApplicationId", appId);
291 tryCompare(spreadView, "phase", 0);
291 tryCompare(spreadView, "phase", 0);
292 }
292 }