From 1f55af8e54dc4841441ab1adf7759baace9452fa Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 27 Feb 2012 13:04:45 +0000 Subject: QPA menu abstraction, originally based on Morten's work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create a QPA abstraction for native menus, derived from the Cocoa support in 4.8, but with the expectation to support other platforms too. Update the QtWidget QMenu and QMenuBar code to maintain their QPA equivalents if they exist. Change-Id: Id605de3da8811dc832bf48b35f9107778ad320ff Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoatheme.mm | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoatheme.mm') diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index d17ee30096..cfb146ad45 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -41,7 +41,8 @@ #include "qcocoatheme.h" -#include "qmenu_mac.h" +#include + #include "qcocoacolordialoghelper.h" #include "qcocoafiledialoghelper.h" #include "qcocoafontdialoghelper.h" @@ -62,17 +63,6 @@ QCocoaTheme::~QCocoaTheme() delete m_systemPalette; } -QPlatformMenu *QCocoaTheme::createPlatformMenu(QMenu *menu) const -{ - return new QCocoaMenu(menu); -} - -QPlatformMenuBar *QCocoaTheme::createPlatformMenuBar(QMenuBar *menuBar) const -{ - return new QCocoaMenuBar(menuBar); -} - - bool QCocoaTheme::usePlatformNativeDialog(DialogType dialogType) const { if (dialogType == QPlatformTheme::FileDialog) -- cgit v1.2.3