aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PySide/QtGui/typesystem_gui_maemo.xml3
-rw-r--r--PySide/QtMaemo5/typesystem_maemo5.xml9
-rw-r--r--tests/qtmaemo5/pickselector_test.py17
3 files changed, 28 insertions, 1 deletions
diff --git a/PySide/QtGui/typesystem_gui_maemo.xml b/PySide/QtGui/typesystem_gui_maemo.xml
index 9efac7dfa..0a06c7755 100644
--- a/PySide/QtGui/typesystem_gui_maemo.xml
+++ b/PySide/QtGui/typesystem_gui_maemo.xml
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<typesystem package="PySide.QtGui">
+ <enum-type name="QAbstractKineticScroller::Mode"/>
+ <enum-type name="QAbstractKineticScroller::OvershootPolicy"/>
+ <enum-type name="QAbstractKineticScroller::State"/>
<object-type name="QAbstractKineticScroller" />
<load-typesystem name="typesystem_gui_x11.xml" generate="yes"/>
diff --git a/PySide/QtMaemo5/typesystem_maemo5.xml b/PySide/QtMaemo5/typesystem_maemo5.xml
index 283f939cb..40a1765ab 100644
--- a/PySide/QtMaemo5/typesystem_maemo5.xml
+++ b/PySide/QtMaemo5/typesystem_maemo5.xml
@@ -10,5 +10,12 @@
<object-type name="QMaemo5InformationBox"/>
<object-type name="QMaemo5ListPickSelector"/>
<object-type name="QMaemo5TimePickSelector"/>
- <object-type name="QMaemo5ValueButton"/>
+ <object-type name="QMaemo5ValueButton">
+ <modify-function signature="setPickSelector(QMaemo5AbstractPickSelector*)">
+ <modify-argument index="1">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
</typesystem>
diff --git a/tests/qtmaemo5/pickselector_test.py b/tests/qtmaemo5/pickselector_test.py
new file mode 100644
index 000000000..013c1d40b
--- /dev/null
+++ b/tests/qtmaemo5/pickselector_test.py
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+import unittest
+from PySide.QtMaemo5 import QMaemo5ListPickSelector, QMaemo5ValueButton
+
+from helper import UsesQApplication
+
+class PickSelectorTest(UsesQApplication):
+ def testOwnership(self):
+ pickselector = QMaemo5ListPickSelector()
+ button = QMaemo5ValueButton("test")
+ button.setPickSelector(pickselector)
+ del pickselector
+ self.assert_(button.pickSelector())
+
+if __name__ == '__main__':
+ unittest.main()
+