diff options
author | abcd <amos.choy@nokia.com> | 2012-05-24 11:22:28 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-24 08:26:51 +0200 |
commit | 67deb6303b4c489914087a93bdc9bb4ba028350d (patch) | |
tree | 3b4095e98cce08d9848ecd8bdc18e64a88c2d9a4 /src/plugins/geoservices/nokia | |
parent | 4f78d7f329732904bc3957aac1d20986f62781db (diff) | |
download | qtlocation-67deb6303b4c489914087a93bdc9bb4ba028350d.tar.gz |
Prepend protocol to request urls for online places plugin
Change-Id: I6669d2ce04c9b533d8f6daa7e60f44e38672f503
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia')
-rw-r--r-- | src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp index e658ebe4..7174b8e9 100644 --- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp +++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp @@ -132,7 +132,9 @@ QPlaceManagerEngineNokiaV2::~QPlaceManagerEngineNokiaV2() {} QPlaceDetailsReply *QPlaceManagerEngineNokiaV2::getPlaceDetails(const QString &placeId) { - QUrl requestUrl(m_uriProvider->getCurrentHost() + QLatin1String("/v1/places/") + placeId); + QUrl requestUrl(QString::fromLatin1("http://") + + m_uriProvider->getCurrentHost() + + QLatin1String("/v1/places/") + placeId); QUrlQuery queryItems; @@ -155,7 +157,9 @@ QPlaceDetailsReply *QPlaceManagerEngineNokiaV2::getPlaceDetails(const QString &p QPlaceContentReply *QPlaceManagerEngineNokiaV2::getPlaceContent(const QString &placeId, const QPlaceContentRequest &request) { - QUrl requestUrl(m_uriProvider->getCurrentHost() + QLatin1String("/v1/places/") + placeId + QLatin1String("/media/")); + QUrl requestUrl(QString::fromLatin1("http://") + + m_uriProvider->getCurrentHost() + + QLatin1String("/v1/places/") + placeId + QLatin1String("/media/")); QNetworkReply *networkReply = 0; @@ -283,7 +287,9 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::search(const QPlaceSearchRequest if (!query.searchTerm().isEmpty()) { // search term query - QUrl requestUrl(m_uriProvider->getCurrentHost() + QLatin1String("/v1/discover/search")); + QUrl requestUrl(QString::fromLatin1("http://") + + m_uriProvider->getCurrentHost() + + QLatin1String("/v1/discover/search")); QUrlQuery queryItems; @@ -313,7 +319,9 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::search(const QPlaceSearchRequest // The request URL should be "/v1/discover/explore" but that returns both places and // clusters of places. We don't support clusters so we use the undocumented // "/v1/discover/explore/places" instead which only returns places. - QUrl requestUrl(m_uriProvider->getCurrentHost() + QLatin1String("/v1/discover/explore/places")); + QUrl requestUrl(QString::fromLatin1("http://") + + m_uriProvider->getCurrentHost() + + QLatin1String("/v1/discover/explore/places")); QUrlQuery queryItems; @@ -354,7 +362,9 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::search(const QPlaceSearchRequest QPlaceSearchReply *QPlaceManagerEngineNokiaV2::recommendations(const QString &placeId, const QPlaceSearchRequest &query) { - QUrl requestUrl(m_uriProvider->getCurrentHost() + QLatin1String("/v1/places/") + placeId + QLatin1String("/related/recommended")); + QUrl requestUrl(QString::fromLatin1("http://") + + m_uriProvider->getCurrentHost() + + QLatin1String("/v1/places/") + placeId + QLatin1String("/related/recommended")); QUrlQuery queryItems; @@ -383,7 +393,9 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::recommendations(const QString &pl QPlaceSearchSuggestionReply *QPlaceManagerEngineNokiaV2::searchSuggestions(const QPlaceSearchRequest &query) { - QUrl requestUrl(m_uriProvider->getCurrentHost() + QLatin1String("/v1/suggest")); + QUrl requestUrl(QString::fromLatin1("http://") + + m_uriProvider->getCurrentHost() + + QLatin1String("/v1/suggest")); QUrlQuery queryItems; @@ -466,7 +478,9 @@ QPlaceReply *QPlaceManagerEngineNokiaV2::initializeCategories() const QString id = QString::fromLatin1(FIXED_CATEGORIES_string + FIXED_CATEGORIES_indices[i]); - QUrl requestUrl(m_uriProvider->getCurrentHost() + QLatin1String("/v1/categories/places/") + id); + QUrl requestUrl(QString::fromLatin1("http://") + + m_uriProvider->getCurrentHost() + + QLatin1String("/v1/categories/places/") + id); QNetworkReply *networkReply = sendRequest(requestUrl); connect(networkReply, SIGNAL(finished()), this, SLOT(categoryReplyFinished())); connect(networkReply, SIGNAL(error(QNetworkReply::NetworkError)), |