pipacs / o2

OAuth 2.0 for Qt
BSD 2-Clause "Simplified" License
317 stars 147 forks source link

o2Requestor methods returns id instead of QNetworkReply #99

Closed ghosalmartin closed 6 years ago

ghosalmartin commented 6 years ago

So yeah when attempting to do

QNetworkReply *reply = requestor->get(request);

this error is thrown

uberlogin.cpp:38: error: invalid conversion from 'int' to 'QNetworkReply*' [-fpermissive] QNetworkReply *reply = requestor->get(request);

what am I supposed to do with the id?

pipacs commented 6 years ago

Requestors return an ID only, instead of a complete reply. That’s because they can deal with token expirations and network timeouts.

The final reply is available via the finished() signal.

If you don’t need to worry about timeouts and expirations, just use a QNetworkAccessManager instead of a requestor, like in the Facebook example.

Akos.

On 26 Nov 2017, at 13.56, Martin Ghosal notifications@github.com wrote:

So yeah when attempting to do

QNetworkReply *reply = requestor->get(request);

this error is thrown

uberlogin.cpp:38: error: invalid conversion from 'int' to 'QNetworkReply' [-fpermissive] QNetworkReply reply = requestor->get(request);

what am I supposed to do with the id?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.