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
453 (scriptFilename.scheme() != "http" &&453 (scriptFilename.scheme() != "http" &&
454 scriptFilename.scheme() != "https" &&454 scriptFilename.scheme() != "https" &&
455 scriptFilename.scheme() != "atp" &&455 scriptFilename.scheme() != "atp" &&
456 scriptFilename.scheme() != "file")) {456 scriptFilename.scheme() != "file" &&
457 scriptFilename.scheme() != "about")) {
457 // deal with a "url" like c:/something458 // deal with a "url" like c:/something
458 scriptUrl = normalizeScriptURL(QUrl::fromLocalFile(scriptFilename.toString()));459 scriptUrl = normalizeScriptURL(QUrl::fromLocalFile(scriptFilename.toString()));
459 } else {460 } else {
@@ -472,7 +473,7 @@ ScriptEngine* ScriptEngines::loadScript(const QUrl& scriptFilename, bool isUserL · 12 unmodified lines
472 }, Qt::QueuedConnection);473 }, Qt::QueuedConnection);
473 474
474 475
475 if (scriptFilename.isEmpty()) {476 if (scriptFilename.isEmpty() || !scriptUrl.isValid()) {
476 launchScriptEngine(scriptEngine);477 launchScriptEngine(scriptEngine);
477 } else {478 } else {
478 // connect to the appropriate signals of this script engine479 // connect to the appropriate signals of this script engine