From e12197e2822a8cca0022d0843057548246930c16 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Sun, 21 Nov 2010 18:08:46 -0300 Subject: Fix generated property flags on metaobject. Fixes bug #478 Reviewer: Luciano Wolf Marcelo Lira --- tests/QtCore/qobject_property_test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/QtCore') diff --git a/tests/QtCore/qobject_property_test.py b/tests/QtCore/qobject_property_test.py index adb1679f3..6e7046d92 100644 --- a/tests/QtCore/qobject_property_test.py +++ b/tests/QtCore/qobject_property_test.py @@ -188,6 +188,20 @@ class PropertyWithNotify(unittest.TestCase): obj.myProperty = 10 self.assert_(self.called_) +class MetaPropertyTest(unittest.TestCase): + def testConstant(self): + obj = MyObject() + mo = obj.metaObject() + self.assertEqual(mo.propertyCount(), 2) + p = mo.property(1) + self.assertTrue(p.isConstant()) + + obj = MyObjectWithNotifyProperty() + mo = obj.metaObject() + self.assertEqual(mo.propertyCount(), 2) + p = mo.property(1) + self.assertFalsee(p.isConstant()) + if __name__ == '__main__': unittest.main() -- cgit v1.2.3