summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-06-29 12:21:04 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-06-29 12:21:04 (GMT)
commit29812003b5ae8641773e0f5bd35cf2c82957088b (patch)
treed732561e2d2e60446a90f6f67d1d42cb2fd5cd68 /tests
parentb6171cfbe3b1453a2c46f78db0df4819e4e5e54f (diff)
downloadQt-29812003b5ae8641773e0f5bd35cf2c82957088b.zip
Qt-29812003b5ae8641773e0f5bd35cf2c82957088b.tar.gz
Qt-29812003b5ae8641773e0f5bd35cf2c82957088b.tar.bz2
Fix autotest failure in QStyle:drawItemPixmap
This was basically a problem with shadow builds not being able to access the pixmap. Reviewed-by:eskil
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qstyle/qstyle.pro3
-rw-r--r--tests/auto/qstyle/tst_qstyle.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qstyle/qstyle.pro b/tests/auto/qstyle/qstyle.pro
index 71ee2e6..ba0908a 100644
--- a/tests/auto/qstyle/qstyle.pro
+++ b/tests/auto/qstyle/qstyle.pro
@@ -2,9 +2,12 @@ load(qttest_p4)
SOURCES += tst_qstyle.cpp
wince*: {
+ DEFINES += SRCDIR=\\\".\\\"
addPixmap.sources = task_25863.png
addPixmap.path = .
DEPLOYMENT += addPixmap
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp
index 961af1b..ed70c1d 100644
--- a/tests/auto/qstyle/tst_qstyle.cpp
+++ b/tests/auto/qstyle/tst_qstyle.cpp
@@ -217,7 +217,8 @@ void tst_QStyle::drawItemPixmap()
{
testWidget->resize(300, 300);
testWidget->show();
- QPixmap p("task_25863.png", "PNG");
+
+ QPixmap p(QString(SRCDIR) + "/task_25863.png", "PNG");
QPixmap actualPix = QPixmap::grabWidget(testWidget);
QVERIFY(pixmapsAreEqual(&actualPix,&p));
testWidget->hide();