diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2011-10-20 00:08:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-05 22:01:49 +0200 |
commit | 3e122f483e238caacf597ea3ac50262f5564bc41 (patch) | |
tree | 78fc0bd154e318491f19ea3713562423cac32092 /examples | |
parent | 881fd46fa90ce3c5dfcb6a5c85e9a9975b20a3e9 (diff) | |
download | qtsvg-3e122f483e238caacf597ea3ac50262f5564bc41.tar.gz |
Port to the new QUrl API, using QUrlQuery
Change-Id: I19e2310caeacd62c2316126119238dfc3e7c1c10
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/embedded/weatherinfo/weatherinfo.cpp | 6 |
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)); |