Removed QVariant from PySide.

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
Hugo Parente Lima 2010-06-10 19:57:18 -03:00
commit 1b6337d8b4
18 changed files with 170 additions and 601 deletions

View file

@ -7,9 +7,10 @@ from PySide.QtCore import *
class QPixmapTest(UsesQApplication):
def testQVariantConstructor(self):
obj = QObject()
pixmap = QPixmap()
v = QVariant(pixmap)
pixmap_copy = QPixmap(v)
obj.setProperty('foo', pixmap)
self.assertEqual(type(obj.property('foo')), QPixmap)
def testQSizeConstructor(self):
pixmap = QPixmap(QSize(10,20))
@ -18,12 +19,6 @@ class QPixmapTest(UsesQApplication):
def testQStringConstructor(self):
pixmap = QPixmap("Testing!")
def testQVariantConstructor2(self):
v = QVariant(QPixmap())
pixmap2 = QPixmap(v)
v = QVariant(QImage())
pixmap2 = QPixmap(v)
def testQPixmapLoadFromDataWithQFile(self):
f = QFile(os.path.join(os.path.dirname(__file__), 'sample.png'))
self.assert_(f.open(QIODevice.ReadOnly))