diff --git a/src/libs/qtlibs/networkresource.cpp b/src/libs/qtlibs/networkresource.cpp index ddf879c4fbf3ac5bc4a532d54e60f46bd6c7c355..3f3c5652b3efeb89ab9a829b994519f6bfacd19c 100644 --- a/src/libs/qtlibs/networkresource.cpp +++ b/src/libs/qtlibs/networkresource.cpp @@ -130,7 +130,7 @@ QByteArray NetworkResource::readData() bool NetworkResource::saveData(const QString &path) { if (reply()->isFinished()) { - return qtlibs::File(path).writeData(readData()); + return qtlibs::File(path).writeData(reply()->readAll()); } return false; } @@ -160,6 +160,7 @@ void NetworkResource::replyFinished() } QNetworkRequest networkRequest = request(); networkRequest.setUrl(QUrl(newUrl)); + reply()->deleteLater(); send(true, networkRequest); return; }