summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-01-20 01:14:52 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-01-20 01:14:52 (GMT)
commit91a2da396fb476401e3b2c55ca7672a8b462ceca (patch)
treedc944bf7d6df0fc0e2b0bad290396084626dd898 /src/script/bridge
parent530fd3831f012337d7460c4387ce82083ab3e144 (diff)
parent5f92bc9dd9f05f4824711b03406bdbe222ff73e9 (diff)
downloadQt-91a2da396fb476401e3b2c55ca7672a8b462ceca.zip
Qt-91a2da396fb476401e3b2c55ca7672a8b462ceca.tar.gz
Qt-91a2da396fb476401e3b2c55ca7672a8b462ceca.tar.bz2
Merge branch '4.6' of ../qt into kinetic-declarativeui
Conflicts: src/corelib/kernel/qobject.cpp
Diffstat (limited to 'src/script/bridge')
-rw-r--r--src/script/bridge/qscriptqobject.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 3f4f6bb..db312bc 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -2220,7 +2220,14 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv)
JSC::call(exec, slot, callType, callData, thisObject, jscArgs);
if (exec->hadException()) {
- engine->emitSignalHandlerException();
+ if (slot.inherits(&QtFunction::info) && !static_cast<QtFunction*>(JSC::asObject(slot))->qobject()) {
+ // The function threw an error because the target QObject has been deleted.
+ // The connections list is stale; remove the signal handler and ignore the exception.
+ removeSignalHandler(sender(), signalIndex, receiver, slot);
+ exec->clearException();
+ } else {
+ engine->emitSignalHandlerException();
+ }
}
}