summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-08-26 15:38:38 +0200
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-08-26 14:02:25 +0000
commit14fac7ee65202b0af7032aaade16d1611bc43731 (patch)
tree7032ae33fab2b76a0410dc39f1164675ac390284 /examples
parentfafc158427e9d54298ce5c3419c1d4b6ec3b946e (diff)
downloadqtlocation-14fac7ee65202b0af7032aaade16d1611bc43731.tar.gz
Fix for broken geocoding in mapviewer with OSM plugin
OSM Nominatim blocks user agents for default libraries. This patch adds a specific user agent to the mapviewer example if one isn't provided by the user Change-Id: I9bc598eec6f53b0990c7cd0fb42cf3ef7807bedb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/location/mapviewer/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/location/mapviewer/main.cpp b/examples/location/mapviewer/main.cpp
index 8b8991fe..1b526435 100644
--- a/examples/location/mapviewer/main.cpp
+++ b/examples/location/mapviewer/main.cpp
@@ -91,6 +91,8 @@ int main(int argc, char *argv[])
if (parseArgs(args, parameters))
return 0;
+ if (!args.contains(QStringLiteral("osm.useragent")))
+ parameters[QStringLiteral("osm.useragent")] = QStringLiteral("QtLocation Mapviewer example");
QQmlApplicationEngine engine;
engine.addImportPath(QStringLiteral(":/imports"));