From 7432bb6bfbda1fcaa3b363b58b0339c780b66483 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 27 Aug 2012 14:03:47 +0200 Subject: [PATCH] Load Mac specific resources when used in a static build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Qt was built statically then the Mac specific resources were not being loaded which meant some style specific images were not used. Task-number: QTBUG-25391 Change-Id: If311148df19a87b6c8104553b662e3bf157f5717 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoaintegration.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index dfb115116e..81d20e93e5 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -59,6 +59,12 @@ #include +static void initResources() +{ + Q_INIT_RESOURCE_EXTERN(qcocoaresources) + Q_INIT_RESOURCE(qcocoaresources); +} + QT_BEGIN_NAMESPACE QCocoaScreen::QCocoaScreen(int screenIndex) @@ -159,6 +165,7 @@ QCocoaIntegration::QCocoaIntegration() , mNativeInterface(new QCocoaNativeInterface) , mServices(new QCocoaServices) { + initResources(); QCocoaAutoReleasePool pool; qApp->setAttribute(Qt::AA_DontUseNativeMenuBar, false);