Fixes QImage constructor signature that used string buffer as image data source.

The fixes uses the patch provided by Pieter Palmers on the bug #489
description[1].

A very simple test, to check the signature existence, was added.

[1] http://bugs.openbossa.org/show_bug.cgi?id=489

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
Marcelo Lira 2010-12-06 15:30:53 -03:00 committed by Hugo Parente Lima
commit f5f2b23a70
3 changed files with 45 additions and 6 deletions

View file

@ -43,6 +43,7 @@ PYSIDE_TEST(qgraphicsitem_isblocked_test.py)
PYSIDE_TEST(qgraphicsitem_test.py)
PYSIDE_TEST(qgraphicsproxywidget_test.py)
PYSIDE_TEST(qgraphicsscene_test.py)
PYSIDE_TEST(qimage_test.py)
PYSIDE_TEST(qinputdialog_get_test.py)
PYSIDE_TEST(qitemselection_test.py)
PYSIDE_TEST(qlayout_ref_test.py)

View file

@ -0,0 +1,20 @@
'''Test cases for QImage'''
import unittest
from PySide.QtGui import QImage
from helper import UsesQApplication
class QImageTest(UsesQApplication):
'''Test case for calling setPixel with float as argument'''
def testQImageStringBuffer(self):
'''Test if the QImage signatures receiving string buffers exist.'''
img0 = QImage('', 100, 100, QImage.Format_ARGB32)
img1 = QImage('', 100, 100, 0, QImage.Format_ARGB32)
if __name__ == '__main__':
unittest.main()