From 46aecbd72b2e0630cc03bd51edf64179968902df Mon Sep 17 00:00:00 2001 From: Palo Kisa Date: Thu, 27 Apr 2017 10:03:53 +0200 Subject: 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) --- tests/auto/gui/image/qicon/tst_qicon.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/gui/image/qicon/tst_qicon.cpp') 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); -- cgit v1.2.3