diff options
author | Paulo Alcantara <pcacjr@gmail.com> | 2011-11-25 15:28:03 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:56:17 -0300 |
commit | 8160e529e2d41351fb191e29b999f32c7807b1e8 (patch) | |
tree | 3572a99f12e7680eb53881878a1aa1d72ad1c5c3 | |
parent | 45ad11e5be972579f492c142ea3caf79e9bf96fd (diff) |
Fix BUG #1048
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewer: Willer Moreira <willer.moreira@openbossa.org>
Hugo Parente Lima <hugo.lima@openbossa.org>
-rw-r--r-- | PySide/QtGui/glue/qlayout_help_functions.h | 3 | ||||
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_1048.py | 8 |
3 files changed, 12 insertions, 0 deletions
diff --git a/PySide/QtGui/glue/qlayout_help_functions.h b/PySide/QtGui/glue/qlayout_help_functions.h index 41b315376..00f0dbde7 100644 --- a/PySide/QtGui/glue/qlayout_help_functions.h +++ b/PySide/QtGui/glue/qlayout_help_functions.h @@ -63,6 +63,9 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other) inline void addLayoutOwnership(QLayout* layout, QLayoutItem* item) { + if (!item) + return; + QWidget* w = item->widget(); if (w) addLayoutOwnership(layout, w); diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 6a4cfe393..acb9a67ee 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -79,6 +79,7 @@ PYSIDE_TEST(bug_991.py) PYSIDE_TEST(bug_998.py) PYSIDE_TEST(bug_1002.py) PYSIDE_TEST(bug_1006.py) +PYSIDE_TEST(bug_1048.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) PYSIDE_TEST(event_filter_test.py) diff --git a/tests/QtGui/bug_1048.py b/tests/QtGui/bug_1048.py new file mode 100644 index 000000000..222c3a60b --- /dev/null +++ b/tests/QtGui/bug_1048.py @@ -0,0 +1,8 @@ +from PySide import QtGui + +a = QtGui.QApplication([]) + +w = QtGui.QWidget() +l = QtGui.QGridLayout(w) + +l.itemAtPosition(0, 0) |