tests/auto/qbrush/tst_qbrush.cpp
changeset 22 79de32ba3296
parent 18 2f34d5167611
child 30 5dc02b23752f
equal deleted inserted replaced
19:fcece45ef507 22:79de32ba3296
    73     void testQGradientCopyConstructor();
    73     void testQGradientCopyConstructor();
    74 
    74 
    75     void gradientStops();
    75     void gradientStops();
    76 
    76 
    77     void textures();
    77     void textures();
    78     
    78 
    79     void nullBrush();
    79     void nullBrush();
    80     void isOpaque();
    80     void isOpaque();
       
    81     void debug();
    81 };
    82 };
    82 
    83 
    83 Q_DECLARE_METATYPE(QBrush)
    84 Q_DECLARE_METATYPE(QBrush)
    84 
    85 
    85 tst_QBrush::tst_QBrush()
    86 tst_QBrush::tst_QBrush()
   388 
   389 
   389     QBrush brush(bm);
   390     QBrush brush(bm);
   390     QVERIFY(!brush.isOpaque());
   391     QVERIFY(!brush.isOpaque());
   391 }
   392 }
   392 
   393 
       
   394 void tst_QBrush::debug()
       
   395 {
       
   396     QPixmap pixmap_source(10, 10);
       
   397     fill(&pixmap_source);
       
   398     QBrush pixmap_brush;
       
   399     pixmap_brush.setTexture(pixmap_source);
       
   400     QCOMPARE(pixmap_brush.style(), Qt::TexturePattern);
       
   401     qDebug() << pixmap_brush; // don't crash
       
   402 }
       
   403 
   393 QTEST_MAIN(tst_QBrush)
   404 QTEST_MAIN(tst_QBrush)
   394 #include "tst_qbrush.moc"
   405 #include "tst_qbrush.moc"