diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-12-28 14:50:46 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:48:05 -0300 |
commit | 92b893c53242a191b76291f8fb0ce68fd284c115 (patch) | |
tree | 4a8e4e5da01122dc1e48e4a6aeb72c3fccbde7a5 /tests/QtDeclarative | |
parent | 6d18229268b42db54824cc277e339bac34ad3404 (diff) |
Fix bug#563 - "Unhandled signal emitting with invalid signature (which leads to application crash)"
Diffstat (limited to 'tests/QtDeclarative')
-rw-r--r-- | tests/QtDeclarative/bug_456.py | 2 | ||||
-rw-r--r-- | tests/QtDeclarative/bug_456.qml | 2 | ||||
-rw-r--r-- | tests/QtDeclarative/connect_python_qml.py | 6 | ||||
-rw-r--r-- | tests/QtDeclarative/connect_python_qml.qml | 20 |
4 files changed, 15 insertions, 15 deletions
diff --git a/tests/QtDeclarative/bug_456.py b/tests/QtDeclarative/bug_456.py index 262b82e48..9ed70c86f 100644 --- a/tests/QtDeclarative/bug_456.py +++ b/tests/QtDeclarative/bug_456.py @@ -33,7 +33,7 @@ class TestConnectionWithInvalidSignature(TimedQApplication): root = view.rootObject() button = root.findChild(QtCore.QObject, "buttonMouseArea") view.show() - button.clicked.emit() + button.entered.emit() self.assertEqual(rotatevalue.rotation, 100) if __name__ == '__main__': diff --git a/tests/QtDeclarative/bug_456.qml b/tests/QtDeclarative/bug_456.qml index e4596fdfb..e8b220ee9 100644 --- a/tests/QtDeclarative/bug_456.qml +++ b/tests/QtDeclarative/bug_456.qml @@ -56,7 +56,7 @@ Rectangle { id: buttonMouseArea objectName: "buttonMouseArea" anchors.fill: parent - onClicked: { + onEntered: { rotatevalue.rotation = rotatevalue.val() } } diff --git a/tests/QtDeclarative/connect_python_qml.py b/tests/QtDeclarative/connect_python_qml.py index e8180f782..669eec653 100644 --- a/tests/QtDeclarative/connect_python_qml.py +++ b/tests/QtDeclarative/connect_python_qml.py @@ -19,9 +19,9 @@ class TestConnectionWithInvalidSignature(TimedQApplication): view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('connect_python_qml.qml', __file__))) root = view.rootObject() button = root.findChild(QtCore.QObject, "buttonMouseArea") - self.assertRaises(TypeError, QtCore.QObject.connect, [button,QtCore.SIGNAL('clicked()'), self.onButtonFailClicked]) - button.clicked.connect(self.onButtonClicked) - button.clicked.emit() + self.assertRaises(TypeError, QtCore.QObject.connect, [button,QtCore.SIGNAL('entered()'), self.onButtonFailClicked]) + button.entered.connect(self.onButtonClicked) + button.entered.emit() view.show() self.app.exec_() self.assert_(self.buttonClicked) diff --git a/tests/QtDeclarative/connect_python_qml.qml b/tests/QtDeclarative/connect_python_qml.qml index dbf890f6f..df55e1b16 100644 --- a/tests/QtDeclarative/connect_python_qml.qml +++ b/tests/QtDeclarative/connect_python_qml.qml @@ -6,15 +6,15 @@ Rectangle { color: "lightgray" Rectangle { - id: button - width: 150; height: 40 - color: "darkgray" - anchors.horizontalCenter: page.horizontalCenter - y: 150 - MouseArea { - id: buttonMouseArea - objectName: "buttonMouseArea" - anchors.fill: parent - } + id: button + width: 150; height: 40 + color: "darkgray" + anchors.horizontalCenter: page.horizontalCenter + y: 150 + MouseArea { + id: buttonMouseArea + objectName: "buttonMouseArea" + anchors.fill: parent + } } } |