History

* Add Qt::DirectConnection to signalHandlerException * CR feedback / coding standards

humbletim committed 9 years ago

Commit 132a8891 parent 417587d1 file · +7 −7Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+7−7
@@ -72,7 +72,7 @@ · 71 unmodified lines
7272 static const QScriptEngine::QObjectWrapOptions DEFAULT_QOBJECT_WRAP_OPTIONS =
7373 QScriptEngine::ExcludeDeleteLater | QScriptEngine::ExcludeChildObjects;
7474 static const QScriptValue::PropertyFlags READONLY_PROP_FLAGS { QScriptValue::ReadOnly | QScriptValue::Undeletable };
75−static const QScriptValue::PropertyFlags HIDDEN_PROP_FLAGS { READONLY_PROP_FLAGS | QScriptValue::SkipInEnumeration };
75+static const QScriptValue::PropertyFlags READONLY_HIDDEN_PROP_FLAGS { READONLY_PROP_FLAGS | QScriptValue::SkipInEnumeration };
7676
7777
7878
@@ -165,7 +165,7 @@ ScriptEngine::ScriptEngine(Context context, const QString& scriptContents, const · 86 unmodified lines
165165 // ... but may not always be available -- so if needed we fallback to the passed exception
166166 emit unhandledException(exception);
167167 }
168− });
168+ }, Qt::DirectConnection);
169169
170170 setProcessEventsInterval(MSECS_PER_SECOND);
171171 if (isEntityServerScript()) {
@@ -1250,7 +1250,7 @@ void ScriptEngine::stopTimer(QTimer *timer) { · 1078 unmodified lines
12501250
12511251 QUrl ScriptEngine::resolvePath(const QString& include) const {
12521252 QUrl url(include);
1253− // first lets check to see if it's already a full URL
1253+ // first lets check to see if it's already a full URL -- or a Windows path like "c:/"
12541254 if (include.startsWith("/") || url.scheme().length() == 1) {
12551255 url = QUrl::fromLocalFile(include);
12561256 }
@@ -1261,12 +1261,12 @@ QUrl ScriptEngine::resolvePath(const QString& include) const { · 4 unmodified lines
12611261 // we apparently weren't a fully qualified url, so, let's assume we're relative
12621262 // to the first absolute URL in the JS scope chain
12631263 QUrl parentURL;
1264− auto ctx = currentContext();
1264+ auto context = currentContext();
12651265 do {
1266− QScriptContextInfo contextInfo { ctx };
1266+ QScriptContextInfo contextInfo { context };
12671267 parentURL = QUrl(contextInfo.fileName());
1268− ctx = ctx->parentContext();
1269− } while (parentURL.isRelative() && ctx);
1268+ context = context->parentContext();
1269+ } while (parentURL.isRelative() && context);
12701270
12711271 if (parentURL.isRelative()) {
12721272 // fallback to the "include" parent (if defined, this will already be absolute)