diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-12-06 15:30:53 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:47:56 -0300 |
commit | f5f2b23a70bb4dbd590cd24f28c0f5740e0f9ef6 (patch) | |
tree | faf766671c30f5b095df4abf00f7e8309a34a886 /tests | |
parent | edf5b58da83696ad908ac21b18bdd9a343d842ee (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/qimage_test.py | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 2ad8269a9..49e9f5ab6 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -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) diff --git a/tests/QtGui/qimage_test.py b/tests/QtGui/qimage_test.py new file mode 100644 index 000000000..d8aa545af --- /dev/null +++ b/tests/QtGui/qimage_test.py @@ -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() + |