Changed qpainter unittest to work from installation directory
authorKurt Korbatits <kurt.korbatits@nokia.com>
Mon, 16 Jan 2012 23:41:17 +0000 (09:41 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 17 Jan 2012 03:54:24 +0000 (04:54 +0100)
- Changed to use QFINDTESTDATA and TESTDATA

Change-Id: If75ae2b8e39f6388f4e84ed4aa2681b5a5917e81
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
tests/auto/gui/painting/qpainter/qpainter.pro
tests/auto/gui/painting/qpainter/tst_qpainter.cpp

index 716d70c..0209043 100644 (file)
@@ -4,13 +4,7 @@ TARGET = tst_qpainter
 QT += widgets widgets-private printsupport testlib
 
 SOURCES  += tst_qpainter.cpp
-wince* {
-    addFiles.files = drawEllipse drawLine_rop_bitmap drawPixmap_rop drawPixmap_rop_bitmap task217400.png
-    addFiles.path = .
-    DEPLOYMENT += addFiles
-    DEFINES += SRCDIR=\\\".\\\"
-} else {
-    DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
-
 mac*:CONFIG+=insignificant_test
+
+TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \
+            task217400.png
index d6511d4..4abaa34 100644 (file)
@@ -3108,7 +3108,7 @@ void tst_QPainter::drawImage_task217400()
 {
     QFETCH(QImage::Format, format);
 
-    const QImage src = QImage(QString(SRCDIR) + "/task217400.png")
+    const QImage src = QImage(QFINDTESTDATA("task217400.png"))
                        .convertToFormat(format);
     QVERIFY(!src.isNull());