Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -4168,7 +4168,11 @@ void Application::loadErrorDomain(QUrl domainURL) { · 4167 unmodified lines | ||
| 4168 | 4168 | bool Application::importImage(const QString& urlString) { |
| 4169 | 4169 | qCDebug(interfaceapp) << "An image file has been dropped in"; |
| 4170 | 4170 | QString filepath(urlString); |
| 4171 | +#if defined(Q_OS_WIN) | |
| 4171 | 4172 | filepath.remove("file:///"); |
| 4173 | +#else | |
| 4174 | + filepath.remove("file://"); | |
| 4175 | +#endif | |
| 4172 | 4176 | addAssetToWorld(filepath, "", false, false); |
| 4173 | 4177 | return true; |
| 4174 | 4178 | } |
| @@ -9530,7 +9534,11 @@ void Application::openDirectory(const QString& path) { · 5355 unmodified lines | ||
| 9530 | 9534 | } |
| 9531 | 9535 | |
| 9532 | 9536 | QString dirPath = path; |
| 9537 | +#if defined(Q_OS_WIN) | |
| 9533 | 9538 | const QString FILE_SCHEME = "file:///"; |
| 9539 | +#else | |
| 9540 | + const QString FILE_SCHEME = "file://"; | |
| 9541 | +#endif | |
| 9534 | 9542 | if (dirPath.startsWith(FILE_SCHEME)) { |
| 9535 | 9543 | dirPath.remove(0, FILE_SCHEME.length()); |
| 9536 | 9544 | } |