Includes refactoring marketplace item tester into a single-page app.
Showing the changes to libraries/script-engine/src/FileScriptingInterface.cpp (1 of 39 files). Show all
Unified · Split
| @@ -50,7 +50,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool · 49 unmodified lines | ||
| 50 | 50 | tempDir = zipTemp.path(); |
| 51 | 51 | path.remove("file:///"); |
| 52 | 52 | } |
| 53 | − | |
| 53 | + | |
| 54 | 54 | qCDebug(scriptengine) << "Temporary directory at: " + tempDir; |
| 55 | 55 | if (!isTempDir(tempDir)) { |
| 56 | 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 | 60 | QStringList fileList = unzipFile(path, tempDir); |
| 61 | − | |
| 61 | + | |
| 62 | 62 | if (!fileList.isEmpty()) { |
| 63 | 63 | qCDebug(scriptengine) << "First file to upload: " + fileList.first(); |
| 64 | 64 | } else { |
| @@ -138,7 +138,8 @@ QString FileScriptingInterface::convertUrlToPath(QUrl url) { · 73 unmodified lines | ||
| 138 | 138 | // this function is not in use |
| 139 | 139 | void FileScriptingInterface::downloadZip(QString path, const QString link) { |
| 140 | 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 | 143 | connect(request, &ResourceRequest::finished, this, [this, path]{ |
| 143 | 144 | unzipFile(path, ""); // so intellisense isn't mad |
| 144 | 145 | }); |