mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 11:46:34 +02:00
try, try again
This commit is contained in:
parent
f2c9bbc32d
commit
164d5d9c7e
1 changed files with 8 additions and 3 deletions
|
@ -42,16 +42,21 @@ ScriptEngines::ScriptEngines()
|
|||
}
|
||||
|
||||
QString normalizeScriptUrl(const QString& rawScriptUrl) {
|
||||
auto lower = rawScriptUrl.toLower();
|
||||
#ifndef Q_OS_LINUX
|
||||
if (!rawScriptUrl.startsWith("http:") && !rawScriptUrl.startsWith("https:") && !rawScriptUrl.startsWith("atp:")) {
|
||||
#ifdef Q_OS_LINUX
|
||||
if (rawScriptUrl.startsWith("file:")) {
|
||||
return rawScriptUrl;
|
||||
}
|
||||
return QUrl::fromLocalFile(rawScriptUrl).toString();
|
||||
#else
|
||||
if (rawScriptUrl.startsWith("file:")) {
|
||||
return rawScriptUrl.toLower();
|
||||
}
|
||||
// Force lowercase on file scripts because of drive letter weirdness.
|
||||
return QUrl::fromLocalFile(rawScriptUrl).toString().toLower();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
return QUrl(rawScriptUrl).toString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue