Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 1 file). Show all
Unified · Split
| @@ -42,16 +42,21 @@ ScriptEngines::ScriptEngines() · 41 unmodified lines | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | QString normalizeScriptUrl(const QString& rawScriptUrl) { | 44 | QString normalizeScriptUrl(const QString& rawScriptUrl) { |
| 45 | auto lower = rawScriptUrl.toLower(); | ||
| 46 | #ifndef Q_OS_LINUX | ||
| 47 | if (!rawScriptUrl.startsWith("http:") && !rawScriptUrl.startsWith("https:") && !rawScriptUrl.startsWith("atp:")) { | 45 | if (!rawScriptUrl.startsWith("http:") && !rawScriptUrl.startsWith("https:") && !rawScriptUrl.startsWith("atp:")) { |
| 46 | #ifdef Q_OS_LINUX | ||
| 47 | if (rawScriptUrl.startsWith("file:")) { | ||
| 48 | return rawScriptUrl; | ||
| 49 | } | ||
| 50 | return QUrl::fromLocalFile(rawScriptUrl).toString(); | ||
| 51 | #else | ||
| 48 | if (rawScriptUrl.startsWith("file:")) { | 52 | if (rawScriptUrl.startsWith("file:")) { |
| 49 | return rawScriptUrl.toLower(); | 53 | return rawScriptUrl.toLower(); |
| 50 | } | 54 | } |
| 51 | // Force lowercase on file scripts because of drive letter weirdness. | 55 | // Force lowercase on file scripts because of drive letter weirdness. |
| 52 | return QUrl::fromLocalFile(rawScriptUrl).toString().toLower(); | 56 | return QUrl::fromLocalFile(rawScriptUrl).toString().toLower(); |
| 53 | } | ||
| 54 | #endif | 57 | #endif |
| 58 | |||
| 59 | } | ||
| 55 | return QUrl(rawScriptUrl).toString(); | 60 | return QUrl(rawScriptUrl).toString(); |
| 56 | } | 61 | } |
| 57 | 62 | ||