summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libpyside/signalmanager.cpp2
-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
5 files changed, 16 insertions, 16 deletions
diff --git a/libpyside/signalmanager.cpp b/libpyside/signalmanager.cpp
index 6cdc3e1..75a0d19 100644
--- a/libpyside/signalmanager.cpp
+++ b/libpyside/signalmanager.cpp
@@ -188,7 +188,7 @@ static bool emitNormalSignal(QObject* source, int signalIndex, const char* signa
Shiboken::AutoDecRef sequence(PySequence_Fast(args, 0));
int argsGiven = PySequence_Fast_GET_SIZE(sequence.object());
- if (argsGiven > argTypes.count()) {
+ if (argsGiven != argTypes.count()) {
PyErr_Format(PyExc_TypeError, "%s only accepts %d arguments, %d given!", signal, argTypes.count(), argsGiven);
return false;
}
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
+ }
}
}