From 22f3d359350fd65e4bbe2e9420fcc4460e8a590a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 10 Mar 2015 22:37:39 +0100 Subject: [PATCH] Cocoa: Fix systray SVG icons. Regression caused by f3699510. Task-number: QTBUG-44686 Change-Id: I546422a67d4da29fac196025b09bddcb45c1b641 Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm index e449fd3..8a35705 100755 --- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm @@ -234,6 +234,10 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) } } + // Handle SVG icons, which do not return anything for availableSizes(). + if (!selectedSize.isValid()) + selectedSize = icon.actualSize(QSize(maxPixmapHeight, maxPixmapHeight), mode); + QPixmap pixmap = icon.pixmap(selectedSize, mode); // Draw a low-resolution icon if there is not enough pixels for a retina -- 1.9.1