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 | 44 | QString normalizeScriptUrl(const QString& rawScriptUrl) { |
| 45 | − auto lower = rawScriptUrl.toLower(); | |
| 46 | −#ifndef Q_OS_LINUX | |
| 47 | 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 | 52 | if (rawScriptUrl.startsWith("file:")) { |
| 49 | 53 | return rawScriptUrl.toLower(); |
| 50 | 54 | } |
| 51 | 55 | // Force lowercase on file scripts because of drive letter weirdness. |
| 52 | 56 | return QUrl::fromLocalFile(rawScriptUrl).toString().toLower(); |
| 53 | − } | |
| 54 | 57 | #endif |
| 58 | + | |
| 59 | + } | |
| 55 | 60 | return QUrl(rawScriptUrl).toString(); |
| 56 | 61 | } |
| 57 | 62 | |