aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <paulo.alcantara@openbossa.org>2011-10-31 13:38:19 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:16 -0300
commit64ffc4f61b874e461c559495ece6f963ce5153ee (patch)
tree6dccb915626f674454a44b824e488efb2e29837e
parent50bf9a570bebf4856645a086fcfbb11d2e3ae778 (diff)
Fix BUG #1031
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org> Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--PySide/QtCore/typesystem_core.xml8
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/bug_1031.py5
3 files changed, 13 insertions, 1 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index b07195555..8c843e2d9 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -3029,7 +3029,13 @@
<enum-type name="State"/>
</object-type>
- <object-type name="QAbstractState" since="4.6" />
+ <object-type name="QAbstractState" since="4.6">
+ <modify-function signature="machine() const">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
<object-type name="QAbstractTransition" since="4.6">
<modify-function signature="QAbstractTransition(QState*)">
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt
index cdd260e0e..ca737063c 100644
--- a/tests/QtCore/CMakeLists.txt
+++ b/tests/QtCore/CMakeLists.txt
@@ -24,6 +24,7 @@ PYSIDE_TEST(bug_953.py)
PYSIDE_TEST(bug_987.py)
PYSIDE_TEST(bug_994.py)
PYSIDE_TEST(bug_1019.py)
+PYSIDE_TEST(bug_1031.py)
PYSIDE_TEST(blocking_signals_test.py)
PYSIDE_TEST(classinfo_test.py)
PYSIDE_TEST(child_event_test.py)
diff --git a/tests/QtCore/bug_1031.py b/tests/QtCore/bug_1031.py
new file mode 100644
index 000000000..b97452543
--- /dev/null
+++ b/tests/QtCore/bug_1031.py
@@ -0,0 +1,5 @@
+from PySide.QtCore import QStateMachine, QState
+
+mach = QStateMachine()
+state = QState(mach)
+print(state.machine())