diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-12-08 10:52:20 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-12-08 10:54:07 (GMT) |
commit | 85cd6e646376af5828e66d9df1812759fcf55f03 (patch) | |
tree | 13b501ed47eed08df022811356f958a8f1b1cd69 /tests/auto/qgraphicseffect | |
parent | 4f6dc78fb05026608ffb03dfae905c23a48aac43 (diff) | |
download | Qt-85cd6e646376af5828e66d9df1812759fcf55f03.zip Qt-85cd6e646376af5828e66d9df1812759fcf55f03.tar.gz Qt-85cd6e646376af5828e66d9df1812759fcf55f03.tar.bz2 |
Fixes broken graphics effect auto tests.
This broke after commit: fb78a402b512b017c850e7410745c4d20da04a7c
Effects and auto-tests are now in line with the documentation.
Diffstat (limited to 'tests/auto/qgraphicseffect')
-rw-r--r-- | tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index d216924..259df4d 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -196,8 +196,8 @@ void tst_QGraphicsEffect::source() // Uninstall effect on QGraphicsItem. effect->reset(); item->setGraphicsEffect(0); - QVERIFY(!effect->source()); - QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceDetached); + QVERIFY(!effect); + effect = new CustomEffect; // The item takes ownership and should delete the effect when destroyed. item->setGraphicsEffect(effect); @@ -249,10 +249,10 @@ void tst_QGraphicsEffect::boundingRect() QCOMPARE(effect->boundingRect(), effect->boundingRectFor(itemRect)); // Uninstall effect on QGraphicsItem. + QPointer<CustomEffect> ptr = effect; item->setGraphicsEffect(0); - QCOMPARE(effect->boundingRect(), QRectF()); + QVERIFY(!ptr); - delete effect; delete item; } @@ -343,11 +343,11 @@ void tst_QGraphicsEffect::draw() QCOMPARE(item->numRepaints, 0); // Make sure uninstalling an effect triggers a repaint. + QPointer<CustomEffect> ptr = effect; item->setGraphicsEffect(0); + QVERIFY(!ptr); QTest::qWait(50); - QCOMPARE(effect->numRepaints, 0); QCOMPARE(item->numRepaints, 1); - delete effect; } void tst_QGraphicsEffect::opacity() |