History

update script engine to not treat about:* as a local filename; resolve debugPrint FIXME

humbletim committed 9 years ago

Commit e765d881 parent 8cea7f63 files · +13 −6Browse files

Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 3 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngines.cpp+3−2
@@ -453,7 +453,8 @@ ScriptEngine* ScriptEngines::loadScript(const QUrl& scriptFilename, bool isUserL · 452 unmodified lines
453453 (scriptFilename.scheme() != "http" &&
454454 scriptFilename.scheme() != "https" &&
455455 scriptFilename.scheme() != "atp" &&
456− scriptFilename.scheme() != "file")) {
456+ scriptFilename.scheme() != "file" &&
457+ scriptFilename.scheme() != "about")) {
457458 // deal with a "url" like c:/something
458459 scriptUrl = normalizeScriptURL(QUrl::fromLocalFile(scriptFilename.toString()));
459460 } else {
@@ -472,7 +473,7 @@ ScriptEngine* ScriptEngines::loadScript(const QUrl& scriptFilename, bool isUserL · 12 unmodified lines
472473 }, Qt::QueuedConnection);
473474
474475
475− if (scriptFilename.isEmpty()) {
476+ if (scriptFilename.isEmpty() || !scriptUrl.isValid()) {
476477 launchScriptEngine(scriptEngine);
477478 } else {
478479 // connect to the appropriate signals of this script engine