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/gui/kernel/qplatformtheme_qpa.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/gui/kernel/qplatformtheme_qpa.cpp') diff --git a/src/gui/kernel/qplatformtheme_qpa.cpp b/src/gui/kernel/qplatformtheme_qpa.cpp index c9ffbe248f..32204e6a26 100644 --- a/src/gui/kernel/qplatformtheme_qpa.cpp +++ b/src/gui/kernel/qplatformtheme_qpa.cpp @@ -109,18 +109,6 @@ QPlatformTheme::~QPlatformTheme() } -QPlatformMenu *QPlatformTheme::createPlatformMenu(QMenu *menu) const -{ - Q_UNUSED(menu); - return 0; -} - -QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar(QMenuBar *menuBar) const -{ - Q_UNUSED(menuBar); - return 0; -} - bool QPlatformTheme::usePlatformNativeDialog(DialogType type) const { Q_UNUSED(type); @@ -183,4 +171,19 @@ QVariant QPlatformTheme::themeHint(ThemeHint hint) const return QVariant(); } +QPlatformMenuItem *QPlatformTheme::createPlatformMenuItem() const +{ + return 0; +} + +QPlatformMenu *QPlatformTheme::createPlatformMenu() const +{ + return 0; +} + +QPlatformMenuBar *QPlatformTheme::createPlatformMenuBar() const +{ + return 0; +} + QT_END_NAMESPACE -- cgit v1.2.3