- Timestamp:
- 04/18/12 20:26:48 (11 years ago)
- Branches:
- master, qt5
- Children:
- dadb922
- Parents:
- d466553
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
rd466553 r1ba9324 335 335 } 336 336 337 void MainWindow::networkQueryFinished(QNetworkReply *aReply) 338 { 339 if ( aReply->error() != QNetworkReply::NoError ) 340 { 337 void MainWindow::networkQueryFinished(QNetworkReply *aReply) { 338 if (aReply->error() != QNetworkReply::NoError) { 341 339 error_message(QString("Error occured during download: ") + aReply->errorString()); 342 } 343 else 344 { 345 importData(aReply->readAll(), aReply->url().toEncoded()); 340 } else { 341 QUrl redirectUrl = aReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); 342 if (!redirectUrl.isEmpty()) { 343 if (redirectUrl != aReply->request().url()) { 344 importFromNetwork(redirectUrl.toString()); 345 return; // don't enable controls 346 } else { 347 error_message(QString("Error: Cyclic redirection from %1 to itself.").arg(redirectUrl.toString())); 348 } 349 } else { 350 importData(aReply->readAll(), aReply->url().toEncoded()); 351 } 346 352 } 347 353 setEnabled(true);
Note: See TracChangeset
for help on using the changeset viewer.