diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-12 18:07:55 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-26 22:24:56 +0200 |
commit | 64906d7dcba7702e7a36acfb5984410f7d91ac24 (patch) | |
tree | 04b93c0f22c07ec8ecfa034ef9f35b0a0d5fba3d /tests/manual | |
parent | fdbbfa4a6723b816478ee011ab4098e5332dc2f5 (diff) | |
download | qtlocation-64906d7dcba7702e7a36acfb5984410f7d91ac24.tar.gz |
Simplify Q(Declarative)GeoMapParameter
Move the initialPropertyCount to the QGeoMapParameter class, where
previously the 2 was hardcoded. Don't make type/setType virtual, as the
subclass doesn't override those methods anyway. Remove the unused
constructor taking a list of property names and values.
In QDeclarativeGeoMapParameter, optimize the dynamic connections between
property notification signals and the generic forwarder. Connect between
QMetaMethods, which avoids the repeated lookups, and give the
SignalMapper instances the QMetaProperty as a data member so that we
avoid the lookup of the signal for each signal emission, and only need
one connection per property, rather than two. Also, remove the empty
destructor and apply const where appropriate.
QDeclarativeGeoMapParameter is used only by QDeclarativePolyLineMapItem,
where support for the respective parameters, penStyle and penCap, is not
implemented in the rendering code. None of the other map items support
any such dynamic parameters, their support is not documented, and only
used in the mappolyline manual test. So remove all that code. If we want
to support more properties, then the QDeclarativeMapLineProperties type
gives us that infrastructure already.
Change-Id: Iddaac568a7dc09deb0bb5085b5b90c3cca0fa5ca
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/mappolyline_tester/main.qml | 22 |
1 files changed, 1 insertions, 21 deletions
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 |