mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-15 17:16:40 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into redo-polyvox-locking
This commit is contained in:
commit
c57aa565df
2 changed files with 5 additions and 3 deletions
|
@ -423,12 +423,12 @@ void Resource::handleReplyFinished() {
|
||||||
|
|
||||||
auto result = _request->getResult();
|
auto result = _request->getResult();
|
||||||
if (result == ResourceRequest::Success) {
|
if (result == ResourceRequest::Success) {
|
||||||
|
_data = _request->getData();
|
||||||
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
||||||
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
||||||
|
|
||||||
auto data = _request->getData();
|
emit loaded(_data);
|
||||||
emit loaded(data);
|
downloadFinished(_data);
|
||||||
downloadFinished(data);
|
|
||||||
} else {
|
} else {
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case ResourceRequest::Result::Timeout: {
|
case ResourceRequest::Result::Timeout: {
|
||||||
|
|
|
@ -194,6 +194,7 @@ public:
|
||||||
Q_INVOKABLE void allReferencesCleared();
|
Q_INVOKABLE void allReferencesCleared();
|
||||||
|
|
||||||
const QUrl& getURL() const { return _url; }
|
const QUrl& getURL() const { return _url; }
|
||||||
|
const QByteArray& getData() const { return _data; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
/// Fired when the resource has been downloaded.
|
/// Fired when the resource has been downloaded.
|
||||||
|
@ -234,6 +235,7 @@ protected:
|
||||||
QHash<QPointer<QObject>, float> _loadPriorities;
|
QHash<QPointer<QObject>, float> _loadPriorities;
|
||||||
QWeakPointer<Resource> _self;
|
QWeakPointer<Resource> _self;
|
||||||
QPointer<ResourceCache> _cache;
|
QPointer<ResourceCache> _cache;
|
||||||
|
QByteArray _data;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleDownloadProgress(uint64_t bytesReceived, uint64_t bytesTotal);
|
void handleDownloadProgress(uint64_t bytesReceived, uint64_t bytesTotal);
|
||||||
|
|
Loading…
Reference in a new issue