History

Pre-merge cleanup

Brad Davis committed 8 years ago

Commit 58530c51 parent 82464ee34 files · +288 −257Browse files

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

Unified · Split

interface/src/scripting/AssetMappingsScriptingInterface.cpp+6−12
@@ -139,8 +139,7 @@ void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, · 138 unmodified lines
139139 void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue callback) {
140140 auto assetClient = DependencyManager::get<AssetClient>();
141141 auto request = assetClient->createDeleteMappingsRequest(paths);
142−#if !defined(Q_OS_ANDROID)
143−// TODO: just to make android compile
142+
144143 connect(request, &DeleteMappingsRequest::finished, this, [this, callback](DeleteMappingsRequest* request) mutable {
145144 if (callback.isCallable()) {
146145 QJSValueList args { request->getErrorString() };
@@ -149,7 +148,6 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue · 2 unmodified lines
149148
150149 request->deleteLater();
151150 });
152−#endif
153151
154152 request->start();
155153 }
@@ -157,8 +155,7 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue · 1 unmodified line
157155 void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {
158156 auto assetClient = DependencyManager::get<AssetClient>();
159157 auto request = assetClient->createGetAllMappingsRequest();
160−#if !defined(Q_OS_ANDROID)
161−// TODO: just to make android compile
158+
162159 connect(request, &GetAllMappingsRequest::finished, this, [this, callback](GetAllMappingsRequest* request) mutable {
163160 auto mappings = request->getMappings();
164161 auto map = callback.engine()->newObject();
@@ -174,7 +171,6 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { · 9 unmodified lines
174171
175172 request->deleteLater();
176173 });
177−#endif
178174
179175 request->start();
180176 }
@@ -182,8 +178,7 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) { · 1 unmodified line
182178 void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString newPath, QJSValue callback) {
183179 auto assetClient = DependencyManager::get<AssetClient>();
184180 auto request = assetClient->createRenameMappingRequest(oldPath, newPath);
185−#if !defined(Q_OS_ANDROID)
186−// TODO: just to make android compile
181+
187182 connect(request, &RenameMappingRequest::finished, this, [this, callback](RenameMappingRequest* request) mutable {
188183 if (callback.isCallable()) {
189184 QJSValueList args{ request->getErrorString() };
@@ -192,15 +187,14 @@ void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString new · 2 unmodified lines
192187
193188 request->deleteLater();
194189 });
195−#endif
190+
196191 request->start();
197192 }
198193
199194 void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool enabled, QJSValue callback) {
200195 auto assetClient = DependencyManager::get<AssetClient>();
201196 auto request = assetClient->createSetBakingEnabledRequest(paths, enabled);
202−#if !defined(Q_OS_ANDROID)
203−// TODO: just to make android compile
197+
204198 connect(request, &SetBakingEnabledRequest::finished, this, [this, callback](SetBakingEnabledRequest* request) mutable {
205199 if (callback.isCallable()) {
206200 QJSValueList args{ request->getErrorString() };
@@ -209,7 +203,7 @@ void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool e · 2 unmodified lines
209203
210204 request->deleteLater();
211205 });
212−#endif
206+
213207 request->start();
214208 }
215209