equal
deleted
inserted
replaced
207 } |
207 } |
208 |
208 |
209 void tst_QGraphicsEffectSource::graphicsItem() |
209 void tst_QGraphicsEffectSource::graphicsItem() |
210 { |
210 { |
211 QVERIFY(effect->source()); |
211 QVERIFY(effect->source()); |
212 QCOMPARE(effect->source()->graphicsItem(), item); |
212 QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item); |
213 } |
213 } |
214 |
214 |
215 void tst_QGraphicsEffectSource::styleOption() |
215 void tst_QGraphicsEffectSource::styleOption() |
216 { |
216 { |
217 // We don't have style options unless the source is drawing. |
217 // We don't have style options unless the source is drawing. |
235 // Make sure isPixmap() returns true for QGraphicsPixmapItem. |
235 // Make sure isPixmap() returns true for QGraphicsPixmapItem. |
236 QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem; |
236 QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem; |
237 CustomEffect *anotherEffect = new CustomEffect; |
237 CustomEffect *anotherEffect = new CustomEffect; |
238 pixmapItem->setGraphicsEffect(anotherEffect); |
238 pixmapItem->setGraphicsEffect(anotherEffect); |
239 QVERIFY(anotherEffect->source()); |
239 QVERIFY(anotherEffect->source()); |
240 QCOMPARE(anotherEffect->source()->graphicsItem(), static_cast<QGraphicsItem *>(pixmapItem)); |
240 QCOMPARE(anotherEffect->source()->graphicsItem(), static_cast<const QGraphicsItem *>(pixmapItem)); |
241 QVERIFY(anotherEffect->source()->isPixmap()); |
241 QVERIFY(anotherEffect->source()->isPixmap()); |
242 delete pixmapItem; |
242 delete pixmapItem; |
243 } |
243 } |
244 |
244 |
245 void tst_QGraphicsEffectSource::draw() |
245 void tst_QGraphicsEffectSource::draw() |