Showing the changes to libraries/script-engine/src/FileScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -65,25 +65,21 @@ bool FileScriptingInterface::isTempDir(QString tempDir) { · 64 unmodified lines | |||
| 65 | folderName = "/" + testDir.section("/", -1); | 65 | folderName = "/" + testDir.section("/", -1); |
| 66 | QString testContainer = testDir; | 66 | QString testContainer = testDir; |
| 67 | testContainer.remove(folderName); | 67 | testContainer.remove(folderName); |
| 68 | if (testContainer == tempContainer) return true; | 68 | return (testContainer == tempContainer); |
| 69 | return false; | ||
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | // checks whether the webview is displaying a Clara.io page for Marketplaces.qml | 71 | // checks whether the webview is displaying a Clara.io page for Marketplaces.qml |
| 73 | bool FileScriptingInterface::isClaraLink(QUrl url) { | 72 | bool FileScriptingInterface::isClaraLink(QUrl url) { |
| 74 | if (url.toString().contains("clara.io") && !url.toString().contains("clara.io/signup")) return true; | 73 | return (url.toString().contains("clara.io") && !url.toString().contains("clara.io/signup")); |
| 75 | return false; | ||
| 76 | } | 74 | } |
| 77 | 75 | ||
| 78 | // checks whether a user tries to download a file that is not in .fbx format | 76 | // checks whether a user tries to download a file that is not in .fbx format |
| 79 | bool FileScriptingInterface::isNotFbx(QUrl url) { | 77 | bool FileScriptingInterface::isNotFbx(QUrl url) { |
| 80 | if (url.toString().endsWith(".zip") && !(url.toString().contains("fbx") )) return true; | 78 | return (url.toString().endsWith(".zip") && !(url.toString().contains("fbx") )); |
| 81 | return false; | ||
| 82 | } | 79 | } |
| 83 | 80 | ||
| 84 | bool FileScriptingInterface::isZippedFbx(QUrl url) { | 81 | bool FileScriptingInterface::isZippedFbx(QUrl url) { |
| 85 | if (url.toString().endsWith("fbx.zip")) return true; | 82 | return (url.toString().endsWith("fbx.zip")); |
| 86 | return false; | ||
| 87 | } | 83 | } |
| 88 | 84 | ||
| 89 | // this function is not in use | 85 | // this function is not in use |