summaryrefslogtreecommitdiff
path: root/examples/embedded/weatherinfo/weatherinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/embedded/weatherinfo/weatherinfo.cpp')
-rw-r--r--examples/embedded/weatherinfo/weatherinfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/embedded/weatherinfo/weatherinfo.cpp b/examples/embedded/weatherinfo/weatherinfo.cpp
index 89fc8ab..dfc58c2 100644
--- a/examples/embedded/weatherinfo/weatherinfo.cpp
+++ b/examples/embedded/weatherinfo/weatherinfo.cpp
@@ -175,8 +175,10 @@ private:
void request(const QString &location) {
QUrl url("http://www.google.com/ig/api");
- url.addEncodedQueryItem("hl", "en");
- url.addEncodedQueryItem("weather", QUrl::toPercentEncoding(location));
+ QUrlQuery query;
+ query.addQueryItem("hl", "en");
+ query.addQueryItem("weather", location);
+ url.setQuery(query);
m_manager.get(QNetworkRequest(url));