Updated test with new Property name.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
67cb84debb
commit
b476759ed0
2 changed files with 4 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ class ExQObject(QObject):
|
||||||
def getProperty(self):
|
def getProperty(self):
|
||||||
return self._value
|
return self._value
|
||||||
|
|
||||||
registeredproperty = QProperty(int, getProperty, setProperty)
|
registeredproperty = Property(int, getProperty, setProperty)
|
||||||
|
|
||||||
class MyObject(QObject):
|
class MyObject(QObject):
|
||||||
'''Test Property'''
|
'''Test Property'''
|
||||||
|
|
@ -34,7 +34,7 @@ class MyObject(QObject):
|
||||||
def trySetPP(self):
|
def trySetPP(self):
|
||||||
self.pp = 0
|
self.pp = 0
|
||||||
|
|
||||||
pp = QProperty(int, readPP)
|
pp = Property(int, readPP)
|
||||||
|
|
||||||
class PropertyCase(unittest.TestCase):
|
class PropertyCase(unittest.TestCase):
|
||||||
'''Test case for QObject properties'''
|
'''Test case for QObject properties'''
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from PySide.QtCore import QObject, QProperty, QCoreApplication
|
from PySide.QtCore import QObject, Property, QCoreApplication
|
||||||
from PySide.QtScript import QScriptEngine
|
from PySide.QtScript import QScriptEngine
|
||||||
|
|
||||||
class MyObject(QObject):
|
class MyObject(QObject):
|
||||||
|
|
@ -20,7 +20,7 @@ class MyObject(QObject):
|
||||||
def delX(self):
|
def delX(self):
|
||||||
self._p = 0
|
self._p = 0
|
||||||
|
|
||||||
x = QProperty(int, getX, setX, resetX, delX)
|
x = Property(int, getX, setX, resetX, delX)
|
||||||
|
|
||||||
|
|
||||||
class QPropertyTest(unittest.TestCase):
|
class QPropertyTest(unittest.TestCase):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue