History

Job #19766 BUG: Stop or reload all scripts crashes interface fix, part 2.

Keep the scriptUrl internal to the ScriptEngine class and refer to it externally by the file name string. Change the ScriptEngine constructor to accept a filename QString, instead of a QUrl. Resolve constructor ambiguity in Particle, which creates anonymous ScriptEngine.

matsukaze committed 12 years ago

Commit b4e98401 parent c8c8bcc4 files · +11 −14Browse files

Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all

Unified · Split

interface/src/Application.cpp+2−3
@@ -3492,9 +3492,8 @@ ScriptEngine* Application::loadScript(const QString& scriptName, bool loadScript · 3491 unmodified lines
34923492 scriptEngine = new ScriptEngine(NO_SCRIPT, "", &_controllerScriptingInterface);
34933493 } else {
34943494 // start the script on a new thread...
3495− QUrl scriptUrl(scriptName);
3496− scriptEngine = new ScriptEngine(scriptUrl, &_controllerScriptingInterface);
3497− _scriptEnginesHash.insert(scriptUrl.toString(), scriptEngine);
3495+ scriptEngine = new ScriptEngine(scriptName, &_controllerScriptingInterface);
3496+ _scriptEnginesHash.insert(scriptName, scriptEngine);
34983497
34993498 if (!scriptEngine->hasScript()) {
35003499 qDebug() << "Application::loadScript(), script failed to load...";

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t