summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-11-14 15:02:38 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2022-11-15 12:33:19 +0100
commit2460a29a09116ebdf6d6eb7a7cc9bf5c4e93f7ee (patch)
tree53e2c0b5bfdd3c7699cf69e4dae3befa429936ef
parentc909be782eec96b828d60bc28e028344950accc1 (diff)
downloadqtlocation-2460a29a09116ebdf6d6eb7a7cc9bf5c4e93f7ee.tar.gz
Revive mapitems_backends manual test
Fix up the imports so that the qml file loads. Then follow the changes for the available polyline backends. Change-Id: I01a229264275ef0b89eb71332b06da0be0097b08 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--tests/manual/mapitems_backends/main.qml38
1 files changed, 16 insertions, 22 deletions
diff --git a/tests/manual/mapitems_backends/main.qml b/tests/manual/mapitems_backends/main.qml
index d04f5474..56c4fda2 100644
--- a/tests/manual/mapitems_backends/main.qml
+++ b/tests/manual/mapitems_backends/main.qml
@@ -26,11 +26,10 @@
**
****************************************************************************/
-import QtQuick 2.7
-import QtQuick.Window 2.2
-import QtQuick.Controls 2.2 as C2
-import QtPositioning 5.6
-import QtLocation 5.15
+import QtQuick
+import QtQuick.Controls as C2
+import QtPositioning
+import QtLocation
Window {
id: win
@@ -118,7 +117,7 @@ Window {
Component.onCompleted: {
var o = migComponent.createObject(map)
o.glPolygons = Qt.binding(function() {return switchPolygons1.checked})
- o.glPolylines = Qt.binding(function() {return switchPolylines1.currentText})
+ o.glPolylines = Qt.binding(function() {return switchPolylines1.checked})
o.glCircles = Qt.binding(function() {return switchCircles1.checked})
o.glRectangles = Qt.binding(function() {return switchRectangles1.checked})
map.addMapItemGroup(o);
@@ -135,7 +134,6 @@ Window {
C2.Switch {
text: qsTr("OGL Polygons")
id: switchPolygons1
- checked: true
anchors {
top: parent.top
right: parent.right
@@ -143,8 +141,8 @@ Window {
rightMargin: 12
}
}
- C2.ComboBox {
- model: ['Software','OpenGL','Triangulated']
+ C2.Switch {
+ text: qsTr("OGL Polylines")
id: switchPolylines1
anchors {
top: switchPolygons1.bottom
@@ -228,7 +226,7 @@ Window {
Component.onCompleted: {
var o = migComponent.createObject(map2)
o.glPolygons = Qt.binding(function() {return switchPolygons2.checked})
- o.glPolylines = Qt.binding(function() {return switchPolylines2.currentText})
+ o.glPolylines = Qt.binding(function() {return switchPolylines2.checked})
o.glCircles = Qt.binding(function() {return switchCircles2.checked})
o.glRectangles = Qt.binding(function() {return switchRectangles2.checked})
map2.addMapItemGroup(o);
@@ -237,7 +235,6 @@ Window {
C2.Switch {
text: qsTr("OGL Polygons")
id: switchPolygons2
- checked: false
anchors {
top: parent.top
right: parent.right
@@ -245,8 +242,8 @@ Window {
rightMargin: 12
}
}
- C2.ComboBox {
- model: ['Software','OpenGL','Triangulated']
+ C2.Switch {
+ text: qsTr("OGL Polylines")
id: switchPolylines2
anchors {
top: switchPolygons2.bottom
@@ -254,7 +251,6 @@ Window {
topMargin: 12
rightMargin: 12
}
- onCurrentTextChanged: console.log("CURRENT TEXT CHANGED ",currentText)
}
C2.Switch {
text: qsTr("OGL Circles")
@@ -288,17 +284,15 @@ Window {
id: migComponent
MapItemGroup {
id: polyGroup
- property bool glPolygons : true
- property string glPolylines : "Software"
- property bool glCircles : true
- property bool glRectangles : true
+ property bool glPolygons
+ property bool glPolylines
+ property bool glCircles
+ property bool glRectangles
objectName: parent.objectName + "_MIG_"
function polylineBackend()
{
- return (polyGroup.glPolylines === "OpenGL")
- ? MapPolyline.OpenGLLineStrip
- : ((polyGroup.glPolylines === "Software")
- ? MapPolyline.Software : MapPolyline.OpenGLExtruded)
+ return (polyGroup.glPolylines)
+ ? MapPolyline.OpenGL : MapPolyline.Software
}
function polygonBackend()