You can also use QObject::sender() to get the reply object in the finished slot
void MainWindow::handleUpdateXML()
{
QNetworkReply
*updateReply
= qobject_cast<QNetworkReply
*>
(QObject::sender());
// Actions beng performed to read the XML data and so on...
updateReply->deleteLater();
}
void MainWindow::handleUpdateXML()
{
QNetworkReply *updateReply = qobject_cast<QNetworkReply*>(QObject::sender());
QString xml = QString::fromUTF8(updateReply->readAll());
// Actions beng performed to read the XML data and so on...
updateReply->deleteLater();
}
To copy to clipboard, switch view to plain text mode
Even if you are only using one slot for all replies, you can still identify the request because each reply object contains the QNetworkRequest it was created for
Cheers,
_
Bookmarks