diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/geotestplugin/qgeotiledmap_test.cpp | 11 | ||||
-rw-r--r-- | tests/auto/geotestplugin/qgeotiledmap_test.h | 2 | ||||
-rw-r--r-- | tests/manual/mappolyline_tester/main.qml | 22 |
3 files changed, 8 insertions, 27 deletions
diff --git a/tests/auto/geotestplugin/qgeotiledmap_test.cpp b/tests/auto/geotestplugin/qgeotiledmap_test.cpp index bab66fc1..b4986b08 100644 --- a/tests/auto/geotestplugin/qgeotiledmap_test.cpp +++ b/tests/auto/geotestplugin/qgeotiledmap_test.cpp @@ -27,6 +27,7 @@ ****************************************************************************/ #include "qgeotiledmap_test.h" +#include <QtCore/QMetaProperty> #include <QtPositioning/QGeoCoordinate> #include <QtLocation/private/qgeotiledmap_p_p.h> #include <QtLocation/private/qgeomapparameter_p.h> @@ -60,8 +61,8 @@ public: cameraData.setCenter(newCenter); q->setCameraData(cameraData); // Connect for further changes handling - q->connect(param, SIGNAL(propertyUpdated(QGeoMapParameter *, const char *)), - q, SLOT(onCameraCenter_testChanged(QGeoMapParameter*, const char*))); + q->connect(param, &QGeoMapParameter::propertyUpdated, + q, &QGeoTiledMapTest::onCameraCenter_testChanged); } } @@ -97,12 +98,12 @@ QGeoTiledMapTest::QGeoTiledMapTest(QGeoTiledMappingManagerEngine *engine, { } -void QGeoTiledMapTest::onCameraCenter_testChanged(QGeoMapParameter *param, const char *propertyName) +void QGeoTiledMapTest::onCameraCenter_testChanged(QGeoMapParameter *param, const QMetaProperty &property) { - if (strcmp(propertyName, "center") == 0) { + if (strcmp(property.name(), "center") == 0) { QGeoCameraData cameraData = this->cameraData(); // Not testing for propertyName as this param has only one allowed property - QGeoCoordinate newCenter = param->property(propertyName).value<QGeoCoordinate>(); + QGeoCoordinate newCenter = property.read(param).value<QGeoCoordinate>(); cameraData.setCenter(newCenter); setCameraData(cameraData); } diff --git a/tests/auto/geotestplugin/qgeotiledmap_test.h b/tests/auto/geotestplugin/qgeotiledmap_test.h index 7bb1ea27..7194e3d6 100644 --- a/tests/auto/geotestplugin/qgeotiledmap_test.h +++ b/tests/auto/geotestplugin/qgeotiledmap_test.h @@ -51,7 +51,7 @@ public: QObject *parent = nullptr); protected slots: - void onCameraCenter_testChanged(QGeoMapParameter *param, const char *propertyName); + void onCameraCenter_testChanged(QGeoMapParameter *param, const QMetaProperty &property); public: using QGeoTiledMap::setCameraData; diff --git a/tests/manual/mappolyline_tester/main.qml b/tests/manual/mappolyline_tester/main.qml index c4e62942..9a657309 100644 --- a/tests/manual/mappolyline_tester/main.qml +++ b/tests/manual/mappolyline_tester/main.qml @@ -190,11 +190,6 @@ Window { ? MapPolygon.Software : MapPolygon.OpenGL } - function miterValue() - { - return (miterSwitch.checked) ? Qt.RoundCap : Qt.FlatCap - } - MapPolyline { id: tstPolyLine // to verify the polygon stays where it's supposed to line.color: 'black' @@ -236,10 +231,6 @@ Window { { latitude: 45, longitude: 174 }, { latitude: 43, longitude: -168 } ] - DynamicParameter { - type: "lineStyle" - property var lineCap: miterValue() - } MouseArea { anchors.fill: parent @@ -298,23 +289,12 @@ Window { } checked: false } - C2.Switch { - text: qsTr("Miter") - id: miterSwitch - anchors { - top: leftSwitch.bottom - left: parent.left - leftMargin: 12 - rightMargin: 12 - } - checked: false - } C2.Slider { id: sliWidth orientation: Qt.Vertical anchors { left: parent.left - top: miterSwitch.bottom + top: leftSwitch.bottom bottom: parent.bottom topMargin: 10 leftMargin: 10 |