tst_qnetworkreply: linearise a succession of checks
Restructure an if { if/else} else chain so that it reads more logically.
Change-Id: I0d9a68451147d2b7e6a6d01cf7bee1a64b9902a7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
bb10
parent
32fbcf71ee
commit
06c7d67e13
|
|
@ -1422,14 +1422,12 @@ static QByteArray msgWaitForFinished(QNetworkReplyPtr &reply)
|
|||
QString result;
|
||||
QDebug debug(&result);
|
||||
debug << reply->url();
|
||||
if (reply->isFinished()) {
|
||||
if (reply->error() == QNetworkReply::NoError)
|
||||
debug << "finished.";
|
||||
else
|
||||
debug << "failed: #" << reply->error() << reply->errorString();
|
||||
} else {
|
||||
if (!reply->isFinished())
|
||||
debug << "timed out.";
|
||||
}
|
||||
else if (reply->error() == QNetworkReply::NoError)
|
||||
debug << "finished.";
|
||||
else
|
||||
debug << "failed: #" << reply->error() << reply->errorString();
|
||||
return result.toLocal8Bit();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue