Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -92,8 +92,9 @@ ScriptEngine::ScriptEngine(const QUrl& scriptURL, · 91 unmodified lines | |||
| 92 | 92 | ||
| 93 | QUrl url(scriptURL); | 93 | QUrl url(scriptURL); |
| 94 | 94 | ||
| 95 | // if the scheme is empty, maybe they typed in a file, let's try | 95 | // if the scheme length is one or lower, maybe they typed in a file, let's try |
| 96 | if (url.scheme().isEmpty()) { | 96 | const DWORD WINDOWS_DRIVE_LETTER_SIZE = 1; |
| 97 | if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) { | ||
| 97 | url = QUrl::fromLocalFile(scriptURLString); | 98 | url = QUrl::fromLocalFile(scriptURLString); |
| 98 | } | 99 | } |
| 99 | 100 | ||