From d01f0213b837d71dd77e29752ebcbf161f227a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 20 Jan 2014 09:11:35 +0100 Subject: Cocoa: Establish pattern for accessing globals Use a static QCocoaIntegration pointer instead of QGuiApplication. This removes the need to call out of the platform plugin as well as the casting from "platform" to "cocoa" types. Change-Id: If432b3567811223b73a67548e475e07d63635b73 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm') diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index f9767ce716..327ca00ad6 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -114,7 +114,7 @@ static void cleanupCocoaApplicationDelegate() - (void)updateScreens:(NSNotification *)notification { Q_UNUSED(notification); - if (QCocoaIntegration *ci = dynamic_cast(QGuiApplicationPrivate::platformIntegration())) + if (QCocoaIntegration *ci = QCocoaIntegration::instance()) ci->updateScreens(); } -- cgit v1.2.3