summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-12-09 09:52:14 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-12-09 09:52:20 (GMT)
commiteea71824f57dd61b0a513e3bbb5ced99de505d73 (patch)
tree557ea6ed134681ab948130c860d151816b415a8e /tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
parentc44f142cedf847bfb676eb70cb52f61a6c6ba232 (diff)
parent5146c3cb984fe6bfc661811559515b9e84d14628 (diff)
downloadQt-eea71824f57dd61b0a513e3bbb5ced99de505d73.zip
Qt-eea71824f57dd61b0a513e3bbb5ced99de505d73.tar.gz
Qt-eea71824f57dd61b0a513e3bbb5ced99de505d73.tar.bz2
Merge oslo-staging-2/4.6 into upstream/4.6
Diffstat (limited to 'tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 565a3e7..6266933 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -7962,6 +7962,22 @@ void tst_QGraphicsItem::setGraphicsEffect()
delete item;
QVERIFY(!blurEffect);
delete anotherItem;
+
+ // Ensure the effect is uninstalled when deleting it
+ item = new QGraphicsRectItem(0, 0, 10, 10);
+ blurEffect = new QGraphicsBlurEffect;
+ item->setGraphicsEffect(blurEffect);
+ delete blurEffect;
+ QVERIFY(!item->graphicsEffect());
+
+ // Ensure the existing effect is uninstalled and deleted when setting a null effect
+ blurEffect = new QGraphicsBlurEffect;
+ item->setGraphicsEffect(blurEffect);
+ item->setGraphicsEffect(0);
+ QVERIFY(!item->graphicsEffect());
+ QVERIFY(!blurEffect);
+
+ delete item;
}
void tst_QGraphicsItem::panel()