Showing the changes to libraries/networking/src/BaseAssetScriptingInterface.cpp (1 of 42 files). Show all
Unified · Split
| @@ -96,7 +96,7 @@ Promise BaseAssetScriptingInterface::loadFromCache(const QUrl& url, bool decompr · 95 unmodified lines | |||
| 96 | downloaded->fail(fetched); | 96 | downloaded->fail(fetched); |
| 97 | 97 | ||
| 98 | if (decompress) { | 98 | if (decompress) { |
| 99 | downloaded->then([=](QVariantMap result) { | 99 | downloaded->then([=, this](QVariantMap result) { |
| 100 | fetched->mixin(result); | 100 | fetched->mixin(result); |
| 101 | Promise decompressed = decompressBytes(result.value("data").toByteArray()); | 101 | Promise decompressed = decompressBytes(result.value("data").toByteArray()); |
| 102 | decompressed->mixin(result); | 102 | decompressed->mixin(result); |
| @@ -107,7 +107,7 @@ Promise BaseAssetScriptingInterface::loadFromCache(const QUrl& url, bool decompr · 4 unmodified lines | |||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | fetched->fail(completed); | 109 | fetched->fail(completed); |
| 110 | fetched->then([=](QVariantMap result) { | 110 | fetched->then([=, this](QVariantMap result) { |
| 111 | Promise converted = convertBytes(result.value("data").toByteArray(), responseType); | 111 | Promise converted = convertBytes(result.value("data").toByteArray(), responseType); |
| 112 | converted->mixin(result); | 112 | converted->mixin(result); |
| 113 | converted->ready(completed); | 113 | converted->ready(completed); |
| @@ -140,7 +140,7 @@ Promise BaseAssetScriptingInterface::loadAsset(QString asset, bool decompress, Q · 26 unmodified lines | |||
| 140 | downloaded->fail(fetched); | 140 | downloaded->fail(fetched); |
| 141 | 141 | ||
| 142 | if (decompress) { | 142 | if (decompress) { |
| 143 | downloaded->then([=](QVariantMap result) { | 143 | downloaded->then([=, this](QVariantMap result) { |
| 144 | Q_ASSERT(thread() == QThread::currentThread()); | 144 | Q_ASSERT(thread() == QThread::currentThread()); |
| 145 | fetched->mixin(result); | 145 | fetched->mixin(result); |
| 146 | Promise decompressed = decompressBytes(result.value("data").toByteArray()); | 146 | Promise decompressed = decompressBytes(result.value("data").toByteArray()); |
| @@ -152,7 +152,7 @@ Promise BaseAssetScriptingInterface::loadAsset(QString asset, bool decompress, Q · 5 unmodified lines | |||
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | fetched->fail(completed); | 154 | fetched->fail(completed); |
| 155 | fetched->then([=](QVariantMap result) { | 155 | fetched->then([=, this](QVariantMap result) { |
| 156 | Promise converted = convertBytes(result.value("data").toByteArray(), responseType); | 156 | Promise converted = convertBytes(result.value("data").toByteArray(), responseType); |
| 157 | converted->mixin(result); | 157 | converted->mixin(result); |
| 158 | converted->ready(completed); | 158 | converted->ready(completed); |