Reputation: 4499
I have the following code:
connect(&netMgr, SIGNAL(finished(QNetworkReply*)), this, SLOT(loadFinished(QNetworkReply*)), Qt::UniqueConnection);
reply = netMgr.get(qheader);
How could I tell whether the loadFinished(); slot is triggered by calling reply->abort() or not?
Upvotes: 2
Views: 1578
Reputation: 4286
If aborted, QNetworkReply::error()
should return QNetworkReply::OperationCanceledError
, which means:
the operation was canceled via calls to abort() or close() before it was finished.
Upvotes: 9