diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-15 12:10:10 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-15 12:10:10 (GMT) |
commit | 8e932d7d53168fda6ed39109659efcaf88a32487 (patch) | |
tree | a1a68e31082ee788e66e232f148f3f80268ee5ee /src/script/bridge | |
parent | c32c9c2d2b868cb34fb8917b25273eb52f2c9581 (diff) | |
download | Qt-8e932d7d53168fda6ed39109659efcaf88a32487.zip Qt-8e932d7d53168fda6ed39109659efcaf88a32487.tar.gz Qt-8e932d7d53168fda6ed39109659efcaf88a32487.tar.bz2 |
initial attempt at implementing QScriptEngine::setGlobalObject()
Doesn't actually replace the global object, but rather has the
standard global object act as a proxy to the custom one.
Diffstat (limited to 'src/script/bridge')
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 15d48c3..4a7cd1e 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -1032,7 +1032,7 @@ JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec, object = object.prototype(); qobject = object.toQObject(); } - Q_ASSERT(qobject); + Q_ASSERT_X(qobject, Q_FUNC_INFO, "this-object must be a QObject"); QMetaProperty prop = data->meta->property(data->index); Q_ASSERT(prop.isScriptable()); @@ -1771,16 +1771,16 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv) } } } -// Q_ASSERT(slot != 0); + Q_ASSERT(slot && slot.isObject()); -#if 0 - // ### fixme if (engine->isCollecting()) { + qWarning("QtScript: can't execute signal handler during GC"); // we can't do a script function call during GC, // so we're forced to ignore this signal return; } +#if 0 QScriptFunction *fun = engine->convertToNativeFunction(slot); if (fun == 0) { // the signal handler has been GC'ed. This can only happen when |