mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 12:43:19 +02:00
Merge pull request #7471 from highfidelity/revert-7467-clean/drop-data
Revert "Drop resource data after load"
This commit is contained in:
commit
39ef5402bd
2 changed files with 5 additions and 3 deletions
|
@ -423,12 +423,12 @@ void Resource::handleReplyFinished() {
|
|||
|
||||
auto result = _request->getResult();
|
||||
if (result == ResourceRequest::Success) {
|
||||
_data = _request->getData();
|
||||
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
||||
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
||||
|
||||
auto data = _request->getData();
|
||||
emit loaded(data);
|
||||
downloadFinished(data);
|
||||
emit loaded(_data);
|
||||
downloadFinished(_data);
|
||||
} else {
|
||||
switch (result) {
|
||||
case ResourceRequest::Result::Timeout: {
|
||||
|
|
|
@ -194,6 +194,7 @@ public:
|
|||
Q_INVOKABLE void allReferencesCleared();
|
||||
|
||||
const QUrl& getURL() const { return _url; }
|
||||
const QByteArray& getData() const { return _data; }
|
||||
|
||||
signals:
|
||||
/// Fired when the resource has been downloaded.
|
||||
|
@ -234,6 +235,7 @@ protected:
|
|||
QHash<QPointer<QObject>, float> _loadPriorities;
|
||||
QWeakPointer<Resource> _self;
|
||||
QPointer<ResourceCache> _cache;
|
||||
QByteArray _data;
|
||||
|
||||
private slots:
|
||||
void handleDownloadProgress(uint64_t bytesReceived, uint64_t bytesTotal);
|
||||
|
|
Loading…
Reference in a new issue