From 027cd4c1b9304f05cb6f1b4a163274482aff052b Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 5 Jun 2012 13:35:14 +0200 Subject: [PATCH] Make qicon autotest build without widgets Change-Id: Ic6176404076bac956d00d57c99e0bbf0ac78beca Reviewed-by: Lars Knoll --- tests/auto/gui/image/qicon/qicon.pro | 3 ++- tests/auto/gui/image/qicon/tst_qicon.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/auto/gui/image/qicon/qicon.pro b/tests/auto/gui/image/qicon/qicon.pro index cb9bd2ca19..3c6ced85bd 100644 --- a/tests/auto/gui/image/qicon/qicon.pro +++ b/tests/auto/gui/image/qicon/qicon.pro @@ -2,7 +2,8 @@ CONFIG += testcase CONFIG += parallel_test TARGET = tst_qicon -QT += widgets testlib +QT += testlib +!contains(QT_CONFIG, no-widgets): QT += widgets SOURCES += tst_qicon.cpp RESOURCES = tst_qicon.qrc diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp index cca0887a21..8677e59cd6 100644 --- a/tests/auto/gui/image/qicon/tst_qicon.cpp +++ b/tests/auto/gui/image/qicon/tst_qicon.cpp @@ -70,7 +70,9 @@ private slots: void streamAvailableSizes(); void fromTheme(); +#ifndef QT_NO_WIDGETS void task184901_badCache(); +#endif void task223279_inconsistentAddFile(); private: @@ -536,6 +538,7 @@ static inline bool operator<(const QSize &lhs, const QSize &rhs) return false; } +#ifndef QT_NO_WIDGETS void tst_QIcon::task184901_badCache() { QPixmap pm(QFINDTESTDATA("image.png")); @@ -548,6 +551,7 @@ void tst_QIcon::task184901_badCache() //the disabled icon must now be the same as the normal one. QVERIFY( icon.pixmap(32, QIcon::Normal).toImage() == icon.pixmap(32, QIcon::Disabled).toImage() ); } +#endif void tst_QIcon::fromTheme() {