summaryrefslogtreecommitdiffstats
path: root/tests/QtDeclarative
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-28 14:50:46 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-12-29 10:14:28 -0200
commite8c0ba238a4807a77033ad3d3087787959dc1cc3 (patch)
tree5a1c5190103e7811f5a6a72f7e44efc8b6c4bfc3 /tests/QtDeclarative
parent4b6cc4d478726762d71578a8e2cd0049740d84a6 (diff)
downloadpyside-e8c0ba238a4807a77033ad3d3087787959dc1cc3.tar.gz
pyside-e8c0ba238a4807a77033ad3d3087787959dc1cc3.tar.xz
pyside-e8c0ba238a4807a77033ad3d3087787959dc1cc3.zip
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.py2
-rw-r--r--tests/QtDeclarative/bug_456.qml2
-rw-r--r--tests/QtDeclarative/connect_python_qml.py6
-rw-r--r--tests/QtDeclarative/connect_python_qml.qml20
4 files changed, 15 insertions, 15 deletions
diff --git a/tests/QtDeclarative/bug_456.py b/tests/QtDeclarative/bug_456.py
index 262b82e..9ed70c8 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 e4596fd..e8b220e 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 e8180f7..669eec6 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 dbf890f..df55e1b 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
+ }
}
}