summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorPalo Kisa <palo.kisa@gmail.com>2017-04-27 10:03:53 +0200
committerPalo Kisa <palo.kisa@gmail.com>2017-05-03 06:56:07 +0000
commit46aecbd72b2e0630cc03bd51edf64179968902df (patch)
tree597354d10b7e153a19b98c05498c4990a0d8aa34 /tests/auto
parent9baf7bad5965a6120b7262e5be918ade6ab5d556 (diff)
QIconLoaderEngine: Fix actualSize() for no-entry
Return an empty size if no suitable entry found to avoid mismatch with the returned pixmap()'s size (the QIconEngine::actualSize() returns the originally requested size). Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index d628fad705..e031ffec71 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -594,6 +594,7 @@ void tst_QIcon::fromTheme()
QIcon noIcon = QIcon::fromTheme("broken-icon");
QVERIFY(noIcon.isNull());
QVERIFY(!QIcon::hasThemeIcon("broken-icon"));
+ QCOMPARE(noIcon.actualSize(QSize(32, 32), QIcon::Normal, QIcon::On), QSize(0, 0));
// Test non existing icon with fallback
noIcon = QIcon::fromTheme("broken-icon", abIcon);