summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-11-14 14:54:00 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2022-11-15 12:33:14 +0100
commitc909be782eec96b828d60bc28e028344950accc1 (patch)
tree7fb9a74a00cc95c9a20265898419d5417f993ff6
parent76d775dce392ff6059c32999549dbe381d79b99e (diff)
downloadqtlocation-c909be782eec96b828d60bc28e028344950accc1.tar.gz
Revive mapobjects_tester manual test
Fix up the imports so that the qml file loads. Then follow the changes for the available polyline backends. Change-Id: Idbf4049523ddd8d6857911f76e973a7e24064b42 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--tests/manual/mapobjects_tester/main.qml33
1 files changed, 14 insertions, 19 deletions
diff --git a/tests/manual/mapobjects_tester/main.qml b/tests/manual/mapobjects_tester/main.qml
index b5c6218a..038f1e7a 100644
--- a/tests/manual/mapobjects_tester/main.qml
+++ b/tests/manual/mapobjects_tester/main.qml
@@ -26,12 +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 Qt.labs.location 1.0
+import QtQuick
+import QtQuick.Controls as C2
+import QtPositioning
+import QtLocation
Window {
id: win
@@ -92,7 +90,7 @@ Window {
Component.onCompleted: {
var o = migComponent.createObject(map)
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})
map.addMapItemGroup(o);
@@ -101,7 +99,6 @@ Window {
C2.Switch {
text: qsTr("OGL Polygons")
id: switchPolygons2
- checked: false
anchors {
top: parent.top
right: parent.right
@@ -109,8 +106,8 @@ Window {
rightMargin: 12
}
}
- C2.ComboBox {
- model: ['Software','OpenGL','Triangulated']
+ C2.Switch {
+ text: qsTr("OGL Polylines")
id: switchPolylines2
anchors {
top: switchPolygons2.bottom
@@ -118,7 +115,6 @@ Window {
topMargin: 12
rightMargin: 12
}
- onCurrentTextChanged: console.log("CURRENT TEXT CHANGED ",currentText)
}
C2.Switch {
text: qsTr("OGL Circles")
@@ -147,17 +143,16 @@ 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()