From 9af7104359fd12bd390771ae413b5c1e3971d2f9 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 29 Sep 2014 12:40:56 +0200 Subject: cocoa: override new QPlatformMenu::popup() function Having two versions of popup, one that takes a point and one that takes a target rect, causes problems for client code if they use the 'target rect' version since not all platforms override that function. So this patch will change the remaining platform that override QPlatformmenu into using the new 'target rect' version. Calling the old version that takes a point will still work, since the base version will then convert the point into a zero-sized rect, and forward the call to the 'target rect' version instead. Change-Id: Icc8531d79270a4f24ec08b8ed95b18ed3db1ad4d Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoamenu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/cocoa/qcocoamenu.h') diff --git a/src/plugins/platforms/cocoa/qcocoamenu.h b/src/plugins/platforms/cocoa/qcocoamenu.h index b2a0beb539..adaeeabd9c 100644 --- a/src/plugins/platforms/cocoa/qcocoamenu.h +++ b/src/plugins/platforms/cocoa/qcocoamenu.h @@ -59,7 +59,7 @@ public: void syncMenuItem(QPlatformMenuItem *menuItem); void setEnabled(bool enabled); void setVisible(bool visible); - void showPopup(const QWindow *parentWindow, QPoint pos, const QPlatformMenuItem *item); + void showPopup(const QWindow *parentWindow, const QRect &targetRect, const QPlatformMenuItem *item); void dismiss(); void syncSeparatorsCollapsible(bool enable); -- cgit v1.2.3