summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-20 12:10:06 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-20 12:10:06 (GMT)
commit0fd2c492ee2e8317a5fbb0fb446816df53d5b17b (patch)
tree0e2cb6a5a264b95ba5f38a0c279f730cb1fcbdc7 /tests
parent7f11c900e9184565321c09533b468abb047129b8 (diff)
parent6c8dcd5744e2c14d122f0967de72a9e171dd9715 (diff)
downloadQt-0fd2c492ee2e8317a5fbb0fb446816df53d5b17b.zip
Qt-0fd2c492ee2e8317a5fbb0fb446816df53d5b17b.tar.gz
Qt-0fd2c492ee2e8317a5fbb0fb446816df53d5b17b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixes QPen dash offset for OpenGL paint engines (1.x & 2.x). Support multisampled pbuffers under Windows. tst_qpixmapfilter: Fix compilation in namespace qtextcodec_symbian: Add few aliases Give a warning in QPixmap::handle() if pixmap is not X11 class. Make QStaticText honor QPainter::pen() for rich text on X11 w/raster Fixed compilation of MeeGo graphics system without eglext.h Fixed memory corruption issue in qt_blurImage for Indexed8 images.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
index f0f087d..12d2c57 100644
--- a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
@@ -72,6 +72,7 @@ private slots:
void convolutionBoundingRectFor();
void convolutionDrawSubRect();
void dropShadowBoundingRectFor();
+ void blurIndexed8();
void testDefaultImplementations();
};
@@ -423,6 +424,27 @@ void tst_QPixmapFilter::dropShadowBoundingRectFor()
QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta - 10, -delta - 10, 0, 0));
}
+QT_BEGIN_NAMESPACE
+void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
+QT_END_NAMESPACE
+
+void tst_QPixmapFilter::blurIndexed8()
+{
+ QImage img(16, 32, QImage::Format_Indexed8);
+ img.setColorCount(256);
+ for (int i = 0; i < 256; ++i)
+ img.setColor(i, qRgb(i, i, i));
+
+ img.fill(255);
+
+ QImage original = img;
+ qt_blurImage(img, 10, true, false);
+ QCOMPARE(original.size(), img.size());
+
+ original = img;
+ qt_blurImage(img, 10, true, true);
+ QCOMPARE(original.size(), QSize(img.height(), img.width()));
+}
QTEST_MAIN(tst_QPixmapFilter)
#include "tst_qpixmapfilter.moc"