Don't like ads? PRO users don't see any ads ;-)
Guest

Pocket, BB10, askCodeResponse, QT

By: a guest on Feb 24th, 2013  |  syntax: C++ (with QT extensions)  |  size: 0.54 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }