From 157e218d90ba832b2846889e9f7c94c95ed2cfbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@nokia.com>
Date: Fri, 30 Oct 2009 14:18:43 +0100
Subject: Fix issue with wrong QMessagebox icons on Mac.

Task: QTBUG-4988

68c0e6a8ba1e92bf0152adcaa86eebb83dcfd1d8 introduced
a regression preventing the mac-spesific standardIcon
code form being called.

Call the Mac code if desktopSettingsAware is set.
(QIcon::themeName() is only set on X11)
---
 src/gui/styles/qcommonstyle.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 70d130a..1564a3f 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -5657,10 +5657,11 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
         default:
             break;
         }
-
+    } // if (QApplication::desktopSettingsAware() && !QIcon::themeName().isEmpty())
         if (!icon.isNull())
             return icon;
 #if defined(Q_WS_MAC)
+    if (QApplication::desktopSettingsAware()) {
     OSType iconType = 0;
     switch (standardIcon) {
     case QStyle::SP_MessageBoxQuestion:
@@ -5751,8 +5752,8 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
             ReleaseIconRef(overlayIcon);
         return retIcon;
     }
+    } // if (QApplication::desktopSettingsAware())
 #endif // Q_WS_MAC
-    }
 
     switch (standardIcon) {
 #ifndef QT_NO_IMAGEFORMAT_PNG
-- 
cgit v0.12