summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsview
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-05-18 12:25:08 (GMT)
committeraxis <qt-info@nokia.com>2009-05-18 12:25:08 (GMT)
commit6e81bfbaf69864a06240835e0b30cdc47a2668b7 (patch)
treeaff37bf74549836696d420477e57f51969e97091 /tests/auto/qgraphicsview
parent3e5abb158c1924e555dc4142c4be89adc517b8c1 (diff)
parent7008bfe80e0466ed2978b39e7e698bbd52fb690f (diff)
downloadQt-6e81bfbaf69864a06240835e0b30cdc47a2668b7.zip
Qt-6e81bfbaf69864a06240835e0b30cdc47a2668b7.tar.gz
Qt-6e81bfbaf69864a06240835e0b30cdc47a2668b7.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: configure.exe src/corelib/kernel/qcoreapplication.cpp Configure.exe not rebuilt because the changes are irrelevant for the S60 port. We'll rebuild it before merging back.
Diffstat (limited to 'tests/auto/qgraphicsview')
-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 7934781..ddc2074 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -200,6 +200,7 @@ private slots:
void task239729_noViewUpdate();
void task239047_fitInViewSmallViewport();
void task245469_itemsAtPointWithClip();
+ void task253415_reconnectUpdateSceneOnSceneChanged();
};
void tst_QGraphicsView::initTestCase()
@@ -3048,5 +3049,28 @@ void tst_QGraphicsView::centerOnDirtyItem()
QCOMPARE(before, after);
}
+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"