summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-01 03:07:45 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-01 03:07:45 +0100
commite2b0d7541c1aa3c296cc912f1b0364555b7990c9 (patch)
tree9e74d8cfb366e1830c1a69716128c9df9d49da87 /examples
parent2aac6b3f26690b4d1be94be8f2b556794b022301 (diff)
parent4ee08b0770dc018e390051a35092264f0b1a789a (diff)
downloadqtlocation-e2b0d7541c1aa3c296cc912f1b0364555b7990c9.tar.gz
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I453207cbd09ee4901def858193f33d8cef80a2dc
Diffstat (limited to 'examples')
-rw-r--r--examples/location/geojson_viewer/GeoJsonDelegate.qml11
-rw-r--r--examples/positioning/weatherinfo/appmodel.cpp6
2 files changed, 14 insertions, 3 deletions
diff --git a/examples/location/geojson_viewer/GeoJsonDelegate.qml b/examples/location/geojson_viewer/GeoJsonDelegate.qml
index d3e8db93..ff0fbffa 100644
--- a/examples/location/geojson_viewer/GeoJsonDelegate.qml
+++ b/examples/location/geojson_viewer/GeoJsonDelegate.qml
@@ -98,6 +98,17 @@ DelegateChooser {
opacity: dc.defaultOpacity
color: (props && props.color) || (parent && parent.props && parent.props.color) || dc.defaultColor
border.width: 0
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (props !== undefined)
+ console.log(props.name)
+ else if (parent.parent.geojsonType == "MultiPolygon")
+ console.log(parent.parent.props.name)
+ else
+ console.log("NO NAME!", props)
+ }
+ }
}
}
diff --git a/examples/positioning/weatherinfo/appmodel.cpp b/examples/positioning/weatherinfo/appmodel.cpp
index d07a5980..93186aea 100644
--- a/examples/positioning/weatherinfo/appmodel.cpp
+++ b/examples/positioning/weatherinfo/appmodel.cpp
@@ -347,7 +347,7 @@ void AppModel::handleGeoNetworkData(QNetworkReply *networkReply)
return;
}
- if (!networkReply->error()) {
+ if (!networkReply->networkError()) {
d->nErrors = 0;
if (!d->throttle.isValid())
d->throttle.start();
@@ -403,7 +403,7 @@ void AppModel::handleWeatherNetworkData(QNetworkReply *networkReply)
if (!networkReply)
return;
- if (!networkReply->error()) {
+ if (!networkReply->networkError()) {
foreach (WeatherData *inf, d->forecast)
delete inf;
d->forecast.clear();
@@ -455,7 +455,7 @@ void AppModel::handleForecastNetworkData(QNetworkReply *networkReply)
if (!networkReply)
return;
- if (!networkReply->error()) {
+ if (!networkReply->networkError()) {
QJsonDocument document = QJsonDocument::fromJson(networkReply->readAll());
QJsonObject jo;