diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-22 08:41:53 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-22 08:44:53 +0200 |
commit | 461a29be564271ef3a6ca1728f5e48ec2d25c08d (patch) | |
tree | 27e9b0f90bc09e59fd31b2a5052e0c6f7327c467 /examples | |
parent | 095d29d1afe10569ea3c2b4d834bc832b3ebaf9a (diff) | |
parent | 3d93f6436596e349e43c3798b675af66db71df8a (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
src/oauth/qabstractoauth.cpp
tests/auto/oauth1/tst_oauth1.cpp
Done-with: Jesus Fernandez<jesus.fernandez@qt.io>
Change-Id: I5be2c6ad2cd00943ee3acafe5b5c693fc4ada03c
Diffstat (limited to 'examples')
3 files changed, 5 insertions, 6 deletions
diff --git a/examples/oauth/redditclient/doc/src/qtnetworkauth-redditclient.qdoc b/examples/oauth/redditclient/doc/src/qtnetworkauth-redditclient.qdoc index 773f2db..e83a5e7 100644 --- a/examples/oauth/redditclient/doc/src/qtnetworkauth-redditclient.qdoc +++ b/examples/oauth/redditclient/doc/src/qtnetworkauth-redditclient.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. diff --git a/examples/oauth/twittertimeline/doc/src/qtnetworkauth-twittertimeline.qdoc b/examples/oauth/twittertimeline/doc/src/qtnetworkauth-twittertimeline.qdoc index 7346f55..2696a2a 100644 --- a/examples/oauth/twittertimeline/doc/src/qtnetworkauth-twittertimeline.qdoc +++ b/examples/oauth/twittertimeline/doc/src/qtnetworkauth-twittertimeline.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. diff --git a/examples/oauth/twittertimeline/twittertimelinemodel.cpp b/examples/oauth/twittertimeline/twittertimelinemodel.cpp index 87e387d..6ebe2da 100644 --- a/examples/oauth/twittertimeline/twittertimelinemodel.cpp +++ b/examples/oauth/twittertimeline/twittertimelinemodel.cpp @@ -133,11 +133,11 @@ void TwitterTimelineModel::updateTimeline() QMessageBox::warning(nullptr, qApp->applicationName(), "Not authenticated"); QUrl url("https://api.twitter.com/1.1/statuses/home_timeline.json"); - QUrlQuery query; + QVariantMap parameters; if (tweets.size()) { // Tweets are time-ordered, newest first. Pass the most recent // ID we have to request everything more recent than it: - query.addQueryItem("since_id", QString::number(tweets.first().id)); + parameters.insert("since_id", QString::number(tweets.first().id)); // From https://dev.twitter.com/rest/reference/get/search/tweets: // Returns results with an ID greater than (that is, more recent than) // the specified ID. There are limits to the number of Tweets which can @@ -145,8 +145,7 @@ void TwitterTimelineModel::updateTimeline() // since the since_id, the since_id will be forced to the oldest ID // available. } - url.setQuery(query); - QNetworkReply *reply = twitter.get(url); + QNetworkReply *reply = twitter.get(url, parameters); connect(reply, &QNetworkReply::finished, this, &TwitterTimelineModel::parseJson); } |