History

Added error feature when user tries to download a non fbx file

elisa-lj11 committed 10 years ago

Commit bebf9c51 parent 5c40e9a5 files · +51 −7Browse files

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

Unified · Split

libraries/script-engine/src/FileScriptingInterface.cpp+7−0
@@ -69,11 +69,18 @@ bool FileScriptingInterface::isTempDir(QString tempDir) { · 68 unmodified lines
6969 return false;
7070 }
7171
72+// checks whether the webview is displaying a Clara.io page for Marketplaces.qml
7273 bool FileScriptingInterface::isClaraLink(QUrl url) {
7374 if (url.toString().contains("clara") && !url.toString().contains("clara.io/signup")) return true;
7475 return false;
7576 }
7677
78+// checks whether a user tries to download a file that is not in .fbx format
79+bool FileScriptingInterface::isNotFbx(QUrl url) {
80+ if (url.toString().contains(".zip") && !(url.toString().contains("fbx") )) return true;
81+ return false;
82+}
83+
7784 bool FileScriptingInterface::isZippedFbx(QUrl url) {
7885 if (url.toString().contains(".zip") && url.toString().contains("fbx")) return true;
7986 return false;