diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2012-01-17 09:42:57 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-17 04:54:28 +0100 |
commit | 74bf87aa4b4120f873ac2e1567a79f3268e39824 (patch) | |
tree | e098633b9d5704238937fde97eebd880cd9a6d51 /tests | |
parent | 502b64e06a27c8170c3dc5532ec139b4030268f1 (diff) |
Changed qpixmap unittest to work from installation directory
- Changed to use QFINDTESTDATA and TESTDATA
Change-Id: I962fb8093db5bd83208ebd59ec0cf82005add590
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/gui/image/qpixmap/qpixmap.pro | 20 | ||||
-rw-r--r-- | tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 10 |
2 files changed, 7 insertions, 23 deletions
diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index fc09164c46..15098770c6 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -4,25 +4,9 @@ TARGET = tst_qpixmap QT += core-private gui-private widgets widgets-private testlib SOURCES += tst_qpixmap.cpp -wince* { - task31722_0.files = convertFromImage/task31722_0/*.png - task31722_0.path = convertFromImage/task31722_0 - - task31722_1.files = convertFromImage/task31722_1/*.png - task31722_1.path = convertFromImage/task31722_1 - - icons.files = convertFromToHICON/* - icons.path = convertFromToHICON - - loadFromData.files = loadFromData/* - loadFromData.path = loadFromData - - DEPLOYMENT += task31722_0 task31722_1 icons loadFromData - DEFINES += SRCDIR=\\\".\\\" - DEPLOYMENT_PLUGIN += qico -} else { - DEFINES += SRCDIR=\\\"$$PWD\\\" +!wince* { win32:LIBS += -lgdi32 -luser32 } RESOURCES += qpixmap.qrc +TESTDATA += convertFromImage/* convertFromToHICON/* loadFromData/* images/* diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 7ae680dbdb..a2ae5f0601 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -300,7 +300,7 @@ void tst_QPixmap::convertFromImage_data() { QTest::addColumn<QImage>("img1"); QTest::addColumn<QImage>("img2"); - const QString prefix = QLatin1String(SRCDIR) + "/convertFromImage"; + const QString prefix = QFINDTESTDATA("convertFromImage"); { QImage img1; @@ -994,7 +994,7 @@ void tst_QPixmap::toWinHICON_data() QTest::addColumn<int>("width"); QTest::addColumn<int>("height"); - const QString prefix = QLatin1String(SRCDIR) + "/convertFromToHICON"; + const QString prefix = QFINDTESTDATA("convertFromToHICON"); QTest::newRow("32bpp_16x16") << prefix + QLatin1String("/icon_32bpp") << 16 << 16; QTest::newRow("32bpp_32x32") << prefix + QLatin1String("/icon_32bpp") << 32 << 32; @@ -1290,7 +1290,7 @@ void tst_QPixmap::loadFromDataImage_data() { QTest::addColumn<QString>("imagePath"); - const QString prefix = QLatin1String(SRCDIR) + "/loadFromData"; + const QString prefix = QFINDTESTDATA("loadFromData"); QTest::newRow("designer_argb32.png") << prefix + "/designer_argb32.png"; // When no extension is provided we try all extensions that has been registered by image providers @@ -1324,7 +1324,7 @@ void tst_QPixmap::fromImageReader_data() { QTest::addColumn<QString>("imagePath"); - const QString prefix = QLatin1String(SRCDIR) + "/loadFromData"; + const QString prefix = QFINDTESTDATA("loadFromData"); QTest::newRow("designer_argb32.png") << prefix + "/designer_argb32.png"; QTest::newRow("designer_indexed8_no_alpha.png") << prefix + "/designer_indexed8_no_alpha.png"; @@ -1362,7 +1362,7 @@ void tst_QPixmap::fromImageReaderAnimatedGif() { QFETCH(QString, imagePath); - const QString prefix = QLatin1String(SRCDIR) + "/loadFromData"; + const QString prefix = QFINDTESTDATA("loadFromData"); const QString path = prefix + imagePath; QImageReader referenceReader(path); |