X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=MainApp.cpp;h=cbf6d576fc4b675730617fc435819d8b8a5fe84a;hb=0d6fc382050f1f2efa10ff00e34a18706a350a4e;hp=a7feede51993e45bfca0cd03ea99370f5390907d;hpb=387e8bfa063d5c3038907b56c121916741c5dc10;p=apps%2Fpoi-yelp.git diff --git a/MainApp.cpp b/MainApp.cpp index a7feede..cbf6d57 100644 --- a/MainApp.cpp +++ b/MainApp.cpp @@ -637,36 +637,36 @@ void MainApp::networkReplySearch(QNetworkReply* reply) /* memorize the text which gave this result: */ currentSearchedText = lineEdit.text(); - if (reply->error() == QNetworkReply::NoError) - { - // we only handle this callback if it matches the last search request: - if (reply != pSearchReply) - { - TRACE_INFO("this reply is already too late (or about a different network request)"); - mutex.unlock(); - return; - } - - buflen = reply->read(buf, BIG_BUFFER_SIZE-1); - buf[buflen] = '\0'; - - if (buflen == 0) - { - mutex.unlock(); - return; - } - - - - currentIndex = 0; - Businesses.clear(); - ParseJsonBusinessList(buf, Businesses); - DisplayResultList(true); - FillResultList(Businesses); + if (reply->error() == QNetworkReply::NoError) + { + // we only handle this callback if it matches the last search request: + if (reply != pSearchReply) + { + TRACE_INFO("this reply is already too late (or about a different network request)"); + mutex.unlock(); + return; + } + + buflen = reply->read(buf, BIG_BUFFER_SIZE-1); + buf[buflen] = '\0'; + + if (buflen == 0) + { + mutex.unlock(); + return; + } + + + + currentIndex = 0; + Businesses.clear(); + ParseJsonBusinessList(buf, Businesses); + DisplayResultList(true); + FillResultList(Businesses); } else { - fprintf(stderr,"POI: reply error network please check to poikey and system time (adjusted?)\n"); + fprintf(stderr,"POI: reply error network please check to poikey and system time (adjusted?)\n"); } mutex.unlock(); @@ -868,8 +868,8 @@ int MainApp::AuthenticatePOI(const QString & CredentialsFile) /* Then, send a HTTP request to get the token and wait for answer (synchronously): */ - token = AppSecret; - return 0; + token = AppSecret; + return 0; } int MainApp::StartMonitoringUserInput()