tests/auto/qbrush/tst_qbrush.cpp
branchRCL_3
changeset 14 c0432d11811c
parent 4 3b1da2848fc7
child 30 5dc02b23752f
--- a/tests/auto/qbrush/tst_qbrush.cpp	Wed Apr 21 12:15:23 2010 +0300
+++ b/tests/auto/qbrush/tst_qbrush.cpp	Wed Apr 21 20:15:53 2010 +0300
@@ -75,9 +75,10 @@
     void gradientStops();
 
     void textures();
-    
+
     void nullBrush();
     void isOpaque();
+    void debug();
 };
 
 Q_DECLARE_METATYPE(QBrush)
@@ -390,5 +391,15 @@
     QVERIFY(!brush.isOpaque());
 }
 
+void tst_QBrush::debug()
+{
+    QPixmap pixmap_source(10, 10);
+    fill(&pixmap_source);
+    QBrush pixmap_brush;
+    pixmap_brush.setTexture(pixmap_source);
+    QCOMPARE(pixmap_brush.style(), Qt::TexturePattern);
+    qDebug() << pixmap_brush; // don't crash
+}
+
 QTEST_MAIN(tst_QBrush)
 #include "tst_qbrush.moc"