From 56cdd12649ce194911bafab1914abba5332d7260 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 21 Apr 2015 10:37:38 +0200 Subject: Cocoa: fix compiler warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /Users/erik/dev/qt5-stable/qtbase/src/plugins/platforms/cocoa/qnsview.mm:702:22: warning: incompatible pointer types assigning to 'QNSView_QtNS *' from 'NSView *' [-Wincompatible-pointer-types] targetView = popup->contentView(); ^~~~~~~~~~~~~~~~~~~~ Change-Id: I9e7e25ee9b6dc80ee6f438dc85417838039d440a Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qnsview.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 04f7119730..12854593f8 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -698,8 +698,10 @@ QT_WARNING_POP } // Popups implicitly grap mouse events; forward to the active popup if there is one - if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) - targetView = popup->contentView(); + if (QCocoaWindow *popup = QCocoaIntegration::instance()->activePopupWindow()) { + if (QNSView *popupView = popup->qtView()) + targetView = popupView; + } [targetView convertFromScreen:[self screenMousePoint:theEvent] toWindowPoint:&qtWindowPoint andScreenPoint:&qtScreenPoint]; ulong timestamp = [theEvent timestamp] * 1000; -- cgit v1.2.3