From: Ivailo Monev Date: Wed, 8 Jun 2022 01:12:24 +0000 (+0300) Subject: skip the QFileIconProvider::iconType() test case if there is no system icon theme X-Git-Tag: 4.12.0~626 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7bcef3e549e8c115241af3298a5486f1e0138a8e;p=kde%2FKatie.git skip the QFileIconProvider::iconType() test case if there is no system icon theme Signed-off-by: Ivailo Monev --- diff --git a/tests/auto/qfileiconprovider/tst_qfileiconprovider.cpp b/tests/auto/qfileiconprovider/tst_qfileiconprovider.cpp index 365cfbdbe..0bb5768f4 100644 --- a/tests/auto/qfileiconprovider/tst_qfileiconprovider.cpp +++ b/tests/auto/qfileiconprovider/tst_qfileiconprovider.cpp @@ -74,6 +74,12 @@ void tst_QFileIconProvider::iconType_data() void tst_QFileIconProvider::iconType() { QFETCH(QFileIconProvider::IconType, type); + + const QString icontheme = QIcon::themeName(); + if (icontheme.isEmpty() || icontheme == QLatin1String("hicolor")) { + QSKIP("This test requires system icon theme", SkipAll); + } + SubQFileIconProvider provider; QVERIFY(!provider.icon(type).isNull()); } @@ -104,7 +110,6 @@ void tst_QFileIconProvider::iconInfo() QVERIFY(info.exists()); } SubQFileIconProvider provider; - // we should always get an icon QVERIFY(!provider.icon(info).isNull()); }