summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-01-16 14:00:48 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-17 04:54:07 +0100
commitbd0c7aa3158246ee6e594498259aac82eee22807 (patch)
tree5fae4873829d306a0184c381ed07ae44bab22392 /tests/auto/gui/image
parentb93ce4d78c7a35950a72fde26dda3816301f27b3 (diff)
Changed qimage unittest to work from installation.
- Changed to use QFINDTESTDATA and TESTDATA Change-Id: I7aaf4d16b03373be0fef39fe05c0df0d947dc7e3 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/auto/gui/image')
-rw-r--r--tests/auto/gui/image/qimage/qimage.pro9
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp5
2 files changed, 5 insertions, 9 deletions
diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro
index afa279f340..d9252f036f 100644
--- a/tests/auto/gui/image/qimage/qimage.pro
+++ b/tests/auto/gui/image/qimage/qimage.pro
@@ -4,11 +4,4 @@ SOURCES += tst_qimage.cpp
QT += core-private gui-private testlib
-wince*: {
- addImages.files = images/*
- addImages.path = images
- DEPLOYMENT += addImages
- DEFINES += SRCDIR=\\\".\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
+TESTDATA += images/*
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 479acea3fd..e510252185 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -261,7 +261,10 @@ void tst_QImage::formatHandlersInput_data()
{
QTest::addColumn<QString>("testFormat");
QTest::addColumn<QString>("testFile");
- const QString prefix = QLatin1String(SRCDIR) + "/images/";
+
+ const QString prefix = QFINDTESTDATA("images/");
+ if (prefix.isEmpty())
+ QFAIL("can not find images directory!");
// add a new line here when a file is added
QTest::newRow("ICO") << "ICO" << prefix + "image.ico";