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:
parent
edf5b58da8
commit
f5f2b23a70
3 changed files with 45 additions and 6 deletions
20
tests/QtGui/qimage_test.py
Normal file
20
tests/QtGui/qimage_test.py
Normal 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()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue