the new version check response is now parsed to find the two values version and url independently of the response id

preferencesAboutTextFull
Claudio Valerio 14 years ago
parent dbaafbc95c
commit 7f325c2f4c
  1. 12
      src/core/UBApplicationController.cpp

@ -514,20 +514,16 @@ void UBApplicationController::checkUpdate()
void UBApplicationController::ftpCommandFinished(int id, bool error)
{
qDebug() << id;
if (error){
qWarning() << "ftp command id" << id << "return the error: " << mFtp->errorString();
mFtp->close();
}
else{
// 3 stand for the third command we have sent
// in our case
// 1->connect
// 2->login
// 3->get
if (id == 3){
QString updateString = QString(mFtp->readAll());
QString responseString = QString(mFtp->readAll());
if (!responseString.isEmpty() && responseString.contains("version:") && responseString.contains("url:")){
mFtp->close();
downloadJsonFinished(updateString);
downloadJsonFinished(responseString);
}
}
}

Loading…
Cancel
Save