Resolved a crash when the user enters bad credentials for the network infos

preferencesAboutTextFull
shibakaneki 13 years ago
parent 42a7fef652
commit 804122923f
  1. 42
      src/adaptors/publishing/UBDocumentPublisher.cpp

@ -574,27 +574,31 @@ void UBDocumentPublisher::onFinished(QNetworkReply *reply)
// Now we isolate every cookie value // Now we isolate every cookie value
QStringList qslCookieVals = qsCookieValue.split("; "); QStringList qslCookieVals = qsCookieValue.split("; ");
bool bTransferOk = false; bool bTransferOk = false;
for(int j = 0; j <= qslCookieVals.size(); j++)
{ for(int j = 0; j < qslCookieVals.size(); j++)
if(qslCookieVals.at(j).startsWith("assetStatus")) {
{ qDebug() << j;
QStringList qslAsset = qslCookieVals.at(j).split("="); if(qslCookieVals.at(j).startsWith("assetStatus"))
if(qslAsset.at(1) == "UPLOADED") {
{ QStringList qslAsset = qslCookieVals.at(j).split("=");
bTransferOk = true; if(qslAsset.at(1) == "UPLOADED")
break;
}
}
}
if(bTransferOk)
{
UBApplication::showMessage(tr("Document uploaded correctly on the web."));
}
else
{ {
UBApplication::showMessage(tr("Failed to upload document on the web.")); bTransferOk = true;
break;
} }
}
}
if(bTransferOk)
{
UBApplication::showMessage(tr("Document uploaded correctly on the web."));
}
else
{
UBApplication::showMessage(tr("Failed to upload document on the web."));
}
reply->deleteLater(); reply->deleteLater();
} }

Loading…
Cancel
Save