Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. ...
  2.  else if(state==REQUESTTOKEN) {
  3.             state = GOTTOKEN;
  4.             int endValue = strReply.indexOf("&",0);
  5.             int startValue = strReply.indexOf("=",0);
  6.             token = new QString(strReply.mid(startValue+1,endValue-startValue-1));
  7.             QString *username = new QString(strReply.mid(strReply.lastIndexOf("=")+1));
  8.             qDebug() << "username: " << *username;
  9.         //you can extract the username too from this url
  10.             saveSettings(); //save on the app data directory the token.
  11.         }
  12.  
  13. ...