History

Working on android avatar rendering

Brad Davis committed 8 years ago

Commit bd5af2b1 parent a2c2e7d19 files · +324 −120Browse files

Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 19 files). Show all

Unified · Split

interface/src/scripting/AssetMappingsScriptingInterface.cpp+2−9
@@ -39,9 +39,7 @@ AssetMappingsScriptingInterface::AssetMappingsScriptingInterface() { · 38 unmodified lines
3939 void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJSValue callback) {
4040 auto assetClient = DependencyManager::get<AssetClient>();
4141 auto request = assetClient->createSetMappingRequest(path, hash);
42−#if !defined(Q_OS_ANDROID)
43−// TODO: just to make android compile
44− connect(request, &SetMappingRequest::finished, this, [this, callback](SetMappingRequest* request) mutable {
42+ connect(request, &SetMappingRequest::finished, this, [callback](SetMappingRequest* request) mutable {
4543 if (callback.isCallable()) {
4644 QJSValueList args { request->getErrorString(), request->getPath() };
4745 callback.call(args);
@@ -49,17 +47,13 @@ void AssetMappingsScriptingInterface::setMapping(QString path, QString hash, QJS · 1 unmodified line
4947
5048 request->deleteLater();
5149 });
52−#endif
53−
5450 request->start();
5551 }
5652
5753 void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback) {
5854 auto assetClient = DependencyManager::get<AssetClient>();
5955 auto request = assetClient->createGetMappingRequest(path);
60−#if !defined(Q_OS_ANDROID)
61−// TODO: just to make android compile
62− connect(request, &GetMappingRequest::finished, this, [this, callback](GetMappingRequest* request) mutable {
56+ connect(request, &GetMappingRequest::finished, this, [callback](GetMappingRequest* request) mutable {
6357 auto hash = request->getHash();
6458
6559 if (callback.isCallable()) {
@@ -69,7 +63,6 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback · 3 unmodified lines
6963
7064 request->deleteLater();
7165 });
72−#endif
7366
7467 request->start();
7568 }