on xenial help sign in
Pass the correct number of arguments to mapToItem

One argument used to work in Qt 5.4 and 5.5 but it is not documented and seems to have broken on Qt 5.6 so just update to the correct signature (LP: #1606835) Approved by: Michael Zanetti

commit2a50fd833c897a9a5348862d107b60da42105190 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 28 Jul 2016, 08:16 (10 years ago) parent8b49c63cf786ac
2 files changed+3−3
qml/Launcher/LauncherPanel.qml+1−1 tests/qmltests/Stages/tst_PhoneStage.qml+2−2
qml/Launcher/LauncherPanel.qml+1−1
@@ -758,7 +758,7 @@ Rectangle {
758758 }
759759
760760 // 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)
762762 property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
763763 itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
764764
tests/qmltests/Stages/tst_PhoneStage.qml+2−2
@@ -272,7 +272,7 @@ Item {
272272 var tile = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(data.index));
273273 var appId = ApplicationManager.get(data.index).appId;
274274
275− if (tile.mapToItem(spreadView).x > spreadView.width) {
275+ if (tile.mapToItem(spreadView, 0, 0).x > spreadView.width) {
276276 // Item is not visible... Need to flick the spread
277277 var startX = phoneStage.width - units.gu(1);
278278 var startY = phoneStage.height / 2;
@@ -286,7 +286,7 @@ Item {
286286
287287 console.log("clicking app", data.index, "(", appId, ")")
288288 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)
290290 tryCompare(ApplicationManager, "focusedApplicationId", appId);
291291 tryCompare(spreadView, "phase", 0);
292292 }