History

Display resource-access events in marketplace item tester

Includes refactoring marketplace item tester into a single-page app.

Kerry Ivan Kurian committed 8 years ago

Commit 3b155481 parent 8e5bc1639 files · +846 −383Browse files

Showing the changes to libraries/script-engine/src/FileScriptingInterface.cpp (1 of 39 files). Show all

Unified · Split

libraries/script-engine/src/FileScriptingInterface.cpp+4−3
@@ -50,7 +50,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool · 49 unmodified lines
50 tempDir = zipTemp.path();50 tempDir = zipTemp.path();
51 path.remove("file:///");51 path.remove("file:///");
52 }52 }
53 53
54 qCDebug(scriptengine) << "Temporary directory at: " + tempDir;54 qCDebug(scriptengine) << "Temporary directory at: " + tempDir;
55 if (!isTempDir(tempDir)) {55 if (!isTempDir(tempDir)) {
56 qCDebug(scriptengine) << "Temporary directory mismatch; risk of losing files";56 qCDebug(scriptengine) << "Temporary directory mismatch; risk of losing files";
@@ -58,7 +58,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool · 1 unmodified line
58 }58 }
59 59
60 QStringList fileList = unzipFile(path, tempDir);60 QStringList fileList = unzipFile(path, tempDir);
61 61
62 if (!fileList.isEmpty()) {62 if (!fileList.isEmpty()) {
63 qCDebug(scriptengine) << "First file to upload: " + fileList.first();63 qCDebug(scriptengine) << "First file to upload: " + fileList.first();
64 } else {64 } else {
@@ -138,7 +138,8 @@ QString FileScriptingInterface::convertUrlToPath(QUrl url) { · 73 unmodified lines
138// this function is not in use138// this function is not in use
139void FileScriptingInterface::downloadZip(QString path, const QString link) {139void FileScriptingInterface::downloadZip(QString path, const QString link) {
140 QUrl url = QUrl(link);140 QUrl url = QUrl(link);
141 auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(nullptr, url);141 auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(
142 nullptr, url, true, -1, "FileScriptingInterface::downloadZip");
142 connect(request, &ResourceRequest::finished, this, [this, path]{143 connect(request, &ResourceRequest::finished, this, [this, path]{
143 unzipFile(path, ""); // so intellisense isn't mad144 unzipFile(path, ""); // so intellisense isn't mad
144 });145 });