Use QFINDTESTDATA on tst_QStyle instead of SRCDIR
Update the test code to match the current Qt idiom for finding test data (and fix it on QNX). Change-Id: I63e7c97b717722e4e6859a12f329d56b26584ce6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>bb10
parent
60df445d3b
commit
528fd2149e
|
|
@ -6,10 +6,7 @@ QT += widgets testlib
|
|||
SOURCES += tst_qstyle.cpp
|
||||
|
||||
wince* {
|
||||
DEFINES += SRCDIR=\\\".\\\"
|
||||
addPixmap.files = task_25863.png
|
||||
addPixmap.path = .
|
||||
DEPLOYMENT += addPixmap
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD\\\"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,9 +250,12 @@ void tst_QStyle::testProxyStyle()
|
|||
void tst_QStyle::drawItemPixmap()
|
||||
{
|
||||
testWidget->resize(300, 300);
|
||||
testWidget->show();
|
||||
testWidget->showNormal();
|
||||
|
||||
QPixmap p(QString(SRCDIR) + "/task_25863.png", "PNG");
|
||||
const QString imageFileName = QFINDTESTDATA("task_25863.png");
|
||||
QVERIFY(!imageFileName.isEmpty());
|
||||
|
||||
QPixmap p(imageFileName, "PNG");
|
||||
const QPixmap actualPix = testWidget->grab();
|
||||
|
||||
QCOMPARE(actualPix, p);
|
||||
|
|
|
|||
Loading…
Reference in New Issue