diff options
author | Nick Shaforostoff <shaforostoff@gmail.com> | 2016-04-13 00:47:50 +0300 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-08-26 07:39:53 +0000 |
commit | 8adad2fe09b173ff876895c27884f49804a20bcc (patch) | |
tree | 97cc19e256e08e8c958cb1b60860e153a8f18685 /src/gui/kernel/qplatformtheme.cpp | |
parent | 15c39dfe3db5c4264b49cb53e80ec088ea4948e9 (diff) |
fix build with various QT_NO_* defines
Done-with: Andriy Gerasika <andriy.gerasika@gmail.com>
Change-Id: I90883a491dbddb005c3d756c339e42285d50e437
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/kernel/qplatformtheme.cpp')
-rw-r--r-- | src/gui/kernel/qplatformtheme.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index d80ab8b597..9c140f1d68 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -153,6 +153,7 @@ QT_BEGIN_NAMESPACE */ +#ifndef QT_NO_SHORTCUT // Table of key bindings. It must be sorted on key sequence: // The integer value of VK_KEY | Modifier Keys (e.g., VK_META, and etc.) // A priority of 1 indicates that this is the primary key binding when multiple are defined. @@ -336,6 +337,7 @@ const QKeyBinding QPlatformThemePrivate::keyBindings[] = { }; const uint QPlatformThemePrivate::numberOfKeyBindings = sizeof(QPlatformThemePrivate::keyBindings)/(sizeof(QKeyBinding)); +#endif QPlatformThemePrivate::QPlatformThemePrivate() : systemPalette(0) @@ -591,6 +593,7 @@ static inline int maybeSwapShortcut(int shortcut) } #endif +#ifndef QT_NO_SHORTCUT // mixed-mode predicate: all of these overloads are actually needed (but not all for every compiler) struct ByStandardKey { typedef bool result_type; @@ -641,6 +644,7 @@ QList<QKeySequence> QPlatformTheme::keyBindings(QKeySequence::StandardKey key) c return list; } +#endif /*! Returns the text of a standard \a button. @@ -738,10 +742,12 @@ unsigned QPlatformThemePrivate::currentKeyPlatforms() { const uint keyboardScheme = QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::KeyboardScheme).toInt(); unsigned result = 1u << keyboardScheme; +#ifndef QT_NO_SHORTCUT if (keyboardScheme == QPlatformTheme::KdeKeyboardScheme || keyboardScheme == QPlatformTheme::GnomeKeyboardScheme || keyboardScheme == QPlatformTheme::CdeKeyboardScheme) result |= KB_X11; +#endif return result; } |