Ensure connection lists get cleaned
authorAaron Kennedy <aaron.kennedy@nokia.com>
Tue, 8 Nov 2011 11:37:18 +0000 (11:37 +0000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 Nov 2011 10:31:02 +0000 (11:31 +0100)
Task-number: QTBUG-21368
Change-Id: I2cdecc984edb76a5fb1417cfdb29ffe6b90b0993
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
src/declarative/qml/v8/qv8qobjectwrapper.cpp

index d93e1b8..6a9f583 100644 (file)
@@ -1352,6 +1352,7 @@ v8::Handle<v8::Value> QV8QObjectWrapper::Disconnect(const v8::Arguments &args)
                     // Match!
                     if (connections.connectionsInUse) {
                         connection.needsDestroy = true;
+                        connections.connectionsNeedClean = true;
                     } else {
                         connection.dispose();
                         connections.removeAt(ii);
@@ -1371,6 +1372,7 @@ v8::Handle<v8::Value> QV8QObjectWrapper::Disconnect(const v8::Arguments &args)
                 // Match!
                 if (connections.connectionsInUse) {
                     connection.needsDestroy = true;
+                    connections.connectionsNeedClean = true;
                 } else {
                     connection.dispose();
                     connections.removeAt(ii);