Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 3 files). Show all
Unified · Split
| @@ -453,7 +453,8 @@ ScriptEngine* ScriptEngines::loadScript(const QUrl& scriptFilename, bool isUserL · 452 unmodified lines | ||
| 453 | 453 | (scriptFilename.scheme() != "http" && |
| 454 | 454 | scriptFilename.scheme() != "https" && |
| 455 | 455 | scriptFilename.scheme() != "atp" && |
| 456 | − scriptFilename.scheme() != "file")) { | |
| 456 | + scriptFilename.scheme() != "file" && | |
| 457 | + scriptFilename.scheme() != "about")) { | |
| 457 | 458 | // deal with a "url" like c:/something |
| 458 | 459 | scriptUrl = normalizeScriptURL(QUrl::fromLocalFile(scriptFilename.toString())); |
| 459 | 460 | } else { |
| @@ -472,7 +473,7 @@ ScriptEngine* ScriptEngines::loadScript(const QUrl& scriptFilename, bool isUserL · 12 unmodified lines | ||
| 472 | 473 | }, Qt::QueuedConnection); |
| 473 | 474 | |
| 474 | 475 | |
| 475 | − if (scriptFilename.isEmpty()) { | |
| 476 | + if (scriptFilename.isEmpty() || !scriptUrl.isValid()) { | |
| 476 | 477 | launchScriptEngine(scriptEngine); |
| 477 | 478 | } else { |
| 478 | 479 | // connect to the appropriate signals of this script engine |