History

Add parameter that enables automatically adding download model to world

David Rowe committed 10 years ago

Commit 12747d21 parent 97407e16 files · +26 −8Browse files

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

Unified · Split

libraries/script-engine/src/FileScriptingInterface.cpp+2−2
@@ -31,7 +31,7 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent · 30 unmodified lines
31 // nothing for now31 // nothing for now
32}32}
33 33
34void FileScriptingInterface::runUnzip(QString path, QUrl url) {34void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd) {
35 qDebug() << "Url that was downloaded: " + url.toString();35 qDebug() << "Url that was downloaded: " + url.toString();
36 qDebug() << "Path where download is saved: " + path;36 qDebug() << "Path where download is saved: " + path;
37 QString fileName = "/" + path.section("/", -1);37 QString fileName = "/" + path.section("/", -1);
@@ -47,7 +47,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url) { · 9 unmodified lines
47 if (file != "") {47 if (file != "") {
48 qDebug() << "Object file to upload: " + file;48 qDebug() << "Object file to upload: " + file;
49 QUrl url = QUrl::fromLocalFile(file);49 QUrl url = QUrl::fromLocalFile(file);
50 emit unzipSuccess(url.toString());50 emit unzipSuccess(url.toString(), autoAdd);
51 } else {51 } else {
52 qDebug() << "unzip failed";52 qDebug() << "unzip failed";
53 }53 }