diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-13 17:48:28 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-13 17:48:28 (GMT) |
commit | 213eb572f1902550e36f7e677733aba8d066d94b (patch) | |
tree | 923e7cbd96a30ceed95c5a0bdeacf26c38d55659 /tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | |
parent | df28c1203e12c572f795b8d114254a8e5a6619e8 (diff) | |
parent | b5b011a181bd187dcef5ee8f46a3ac2c5dc2e09c (diff) | |
download | Qt-213eb572f1902550e36f7e677733aba8d066d94b.zip Qt-213eb572f1902550e36f7e677733aba8d066d94b.tar.gz Qt-213eb572f1902550e36f7e677733aba8d066d94b.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fixes QGraphicsItem::focusItem() returning incorrect value.
Fixes crash in QGraphicsScene::addItem().
Diffstat (limited to 'tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp')
-rw-r--r-- | tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index ed8ff04..a771332 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -176,6 +176,7 @@ private slots: void task243004_setStyleCrash(); void task250119_shortcutContext(); void QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems(); + void QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems(); }; @@ -3089,6 +3090,25 @@ void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems() //This should not crash } +void tst_QGraphicsWidget::QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems() +{ + QGraphicsScene scene; + QGraphicsWidget* item1 = new QGraphicsWidget; + QGraphicsWidget* item2 = new QGraphicsWidget; + QGraphicsWidget* item3 = new QGraphicsWidget; + + scene.addItem(item1); + scene.addItem(item2); + + scene.removeItem(item2); + scene.removeItem(item1); + delete item2; + delete item1; + + scene.addItem(item3); + + //This should not crash +} QTEST_MAIN(tst_QGraphicsWidget) #include "tst_qgraphicswidget.moc" |