aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-08 14:36:40 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:42 -0300
commit40938ef3664b941fdae81d6e86a5af2ab67f2671 (patch)
treecbf13c5ed558bea8e00c6e713184bfc7ee047d9b /tests
parenta713e377bbc0cdbceb3b90b32037a6f28c68c0e1 (diff)
Fixes Bug #944: Segfault on QIcon(None).pixmap()
http://bugs.pyside.org/show_bug.cgi?id=944 Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/qicon_test.py17
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 9e5b0c3de..4c5202c43 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -98,6 +98,7 @@ PYSIDE_TEST(qgraphicsitem_isblocked_test.py)
PYSIDE_TEST(qgraphicsitem_test.py)
PYSIDE_TEST(qgraphicsproxywidget_test.py)
PYSIDE_TEST(qgraphicsscene_test.py)
+PYSIDE_TEST(qicon_test.py)
PYSIDE_TEST(qimage_test.py)
PYSIDE_TEST(qinputcontext_test.py)
PYSIDE_TEST(qinputdialog_get_test.py)
diff --git a/tests/QtGui/qicon_test.py b/tests/QtGui/qicon_test.py
new file mode 100644
index 000000000..738e72c50
--- /dev/null
+++ b/tests/QtGui/qicon_test.py
@@ -0,0 +1,17 @@
+
+import unittest
+
+from helper import TimedQApplication
+from PySide.QtGui import QIcon
+
+
+class QIconCtorWithNoneTest(TimedQApplication):
+ '''Test made by seblin, see Bug #944: http://bugs.pyside.org/show_bug.cgi?id=944'''
+
+ def testQIconCtorWithNone(self):
+ icon = QIcon(None)
+ pixmap = icon.pixmap(48, 48)
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()