Make qicon autotest build without widgets
Change-Id: Ic6176404076bac956d00d57c99e0bbf0ac78beca Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
23994a364e
commit
027cd4c1b9
@ -2,7 +2,8 @@ CONFIG += testcase
|
|||||||
CONFIG += parallel_test
|
CONFIG += parallel_test
|
||||||
TARGET = tst_qicon
|
TARGET = tst_qicon
|
||||||
|
|
||||||
QT += widgets testlib
|
QT += testlib
|
||||||
|
!contains(QT_CONFIG, no-widgets): QT += widgets
|
||||||
SOURCES += tst_qicon.cpp
|
SOURCES += tst_qicon.cpp
|
||||||
RESOURCES = tst_qicon.qrc
|
RESOURCES = tst_qicon.qrc
|
||||||
|
|
||||||
|
@ -70,7 +70,9 @@ private slots:
|
|||||||
void streamAvailableSizes();
|
void streamAvailableSizes();
|
||||||
void fromTheme();
|
void fromTheme();
|
||||||
|
|
||||||
|
#ifndef QT_NO_WIDGETS
|
||||||
void task184901_badCache();
|
void task184901_badCache();
|
||||||
|
#endif
|
||||||
void task223279_inconsistentAddFile();
|
void task223279_inconsistentAddFile();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -536,6 +538,7 @@ static inline bool operator<(const QSize &lhs, const QSize &rhs)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_WIDGETS
|
||||||
void tst_QIcon::task184901_badCache()
|
void tst_QIcon::task184901_badCache()
|
||||||
{
|
{
|
||||||
QPixmap pm(QFINDTESTDATA("image.png"));
|
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.
|
//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() );
|
QVERIFY( icon.pixmap(32, QIcon::Normal).toImage() == icon.pixmap(32, QIcon::Disabled).toImage() );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void tst_QIcon::fromTheme()
|
void tst_QIcon::fromTheme()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user