summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-05-13 11:58:08 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-05-13 11:58:08 (GMT)
commit0a74bc2ce91e8c7a10ae54fd0f80814902fa5de9 (patch)
tree046ad0fdf693107efb75a0ecd03f6cbc3dd00680 /tests/auto/qgraphicsview/tst_qgraphicsview.cpp
parentc2c69c117407990e5c2d8900f4aa27979273084a (diff)
parenta18ebd2a70e83863bc9a8cc64a65791a6d879f02 (diff)
downloadQt-0a74bc2ce91e8c7a10ae54fd0f80814902fa5de9.zip
Qt-0a74bc2ce91e8c7a10ae54fd0f80814902fa5de9.tar.gz
Qt-0a74bc2ce91e8c7a10ae54fd0f80814902fa5de9.tar.bz2
Merge branch '4.5'
Conflicts: tests/auto/qgraphicsview/tst_qgraphicsview.cpp
Diffstat (limited to 'tests/auto/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index bb61f90..920cba7 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -204,6 +204,7 @@ private slots:
void task239729_noViewUpdate();
void task239047_fitInViewSmallViewport();
void task245469_itemsAtPointWithClip();
+ void task253415_reconnectUpdateSceneOnSceneChanged();
};
void tst_QGraphicsView::initTestCase()
@@ -3200,5 +3201,28 @@ void tst_QGraphicsView::mouseTracking2()
QCOMPARE(spy.count(), 1);
}
+void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged()
+{
+ QGraphicsView view;
+ QGraphicsView dummyView;
+ view.setWindowFlags(view.windowFlags() | Qt::WindowStaysOnTopHint);
+ view.resize(200, 200);
+
+ QGraphicsScene scene1;
+ QObject::connect(&scene1, SIGNAL(changed(QList<QRectF>)), &dummyView, SLOT(updateScene(QList<QRectF>)));
+ view.setScene(&scene1);
+
+ QTest::qWait(125);
+
+ QGraphicsScene scene2;
+ QObject::connect(&scene2, SIGNAL(changed(QList<QRectF>)), &dummyView, SLOT(updateScene(QList<QRectF>)));
+ view.setScene(&scene2);
+
+ QTest::qWait(125);
+
+ bool wasConnected2 = QObject::disconnect(&scene2, SIGNAL(changed(QList<QRectF>)), &view, 0);
+ QVERIFY(wasConnected2);
+}
+
QTEST_MAIN(tst_QGraphicsView)
#include "tst_qgraphicsview.moc"