Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. void YourClassName::requestFinished(QNetworkReply* reply) {
  2.     if (reply->error() == QNetworkReply::NoError) { // Check the network reply for errors
  3.         QByteArray bArray = reply->readAll();
  4.         QString strReply = QString::fromUtf8(bArray);
  5.         if(state==REQUESTCODE) { //it is a response from a RequestCode action.
  6.             appCode = new QString(strReply.mid(5));
  7. //with "mid" we strip the first 5 characters, cause we don't need it, and save locally, the app code.
  8.                     launchAuthBrowser(); //we can call the brower now
  9.             }
  10.     // ...
  11. }