diff options
author | aavit <qt-info@nokia.com> | 2011-05-06 07:30:14 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-05-06 07:30:14 (GMT) |
commit | b81e1b76231dfe41de1857e87d4f6bf918c609a6 (patch) | |
tree | ab5d96bd1299f426547e4845040f165bfd876fad /tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | |
parent | 7ac511d8d906575dff1a02361e31251b244d3b3a (diff) | |
parent | 1d9a18142eb19d5dde93b7e5c63f9be0e4caf896 (diff) | |
download | Qt-b81e1b76231dfe41de1857e87d4f6bf918c609a6.zip Qt-b81e1b76231dfe41de1857e87d4f6bf918c609a6.tar.gz Qt-b81e1b76231dfe41de1857e87d4f6bf918c609a6.tar.bz2 |
Merge remote branch 'qt-mainline/4.8'
Diffstat (limited to 'tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp')
-rw-r--r-- | tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index e8e2e23..887026c 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -186,7 +186,6 @@ private slots: void task250119_shortcutContext(); void QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems(); void QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems(); - void QT_BUG_13865_doublePaintWhenAddingASubItem(); }; @@ -3367,46 +3366,6 @@ void tst_QGraphicsWidget::QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems() //This should not crash } - -struct GreenWidget : public QGraphicsWidget -{ - GreenWidget() : count(0) - { - } - - void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * ) - { - count++; - painter->setPen(Qt::green); - painter->drawRect(option->rect.adjusted(0,0,-1,-1)); - } - - int count; -}; - -void tst_QGraphicsWidget::QT_BUG_13865_doublePaintWhenAddingASubItem() -{ - QGraphicsScene scene; - QGraphicsView view(&scene); - QGraphicsWidget *widget = new QGraphicsWidget; - widget->resize(100, 100); - scene.addItem(widget); - QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(widget); - - view.show(); - QTest::qWaitForWindowShown(&view); - QApplication::processEvents(); - - - GreenWidget *sub = new GreenWidget; - layout->addItem(sub); - - QTest::qWait(100); - QCOMPARE(sub->count, 1); //it should only be painted once - -} - - QTEST_MAIN(tst_QGraphicsWidget) #include "tst_qgraphicswidget.moc" |