From ab2a6bbca9eccc4b2fde2e3af1fb1b9f6cee5cd3 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 29 Jun 2012 13:25:31 +0200 Subject: [PATCH] Make qwindowsysteminterface.cpp compile with QT_NO_SHORTCUT Task-number: QTBUG-24816 Change-Id: Ia3d20775d28922ee94f965b4a7bc993915f34d6b Reviewed-by: Tasuku Suzuki Reviewed-by: Jeremy Katz --- src/gui/kernel/qwindowsysteminterface.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index e884d7c..f9eae3b 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -174,11 +174,22 @@ bool QWindowSystemInterface::tryHandleSynchronousShortcutEvent(QWindow *w, int k bool QWindowSystemInterface::tryHandleSynchronousShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) { +#ifndef QT_NO_SHORTCUT QGuiApplicationPrivate::modifier_buttons = mods; QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count); qevent.setTimestamp(timestamp); return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent); +#else + Q_UNUSED(w) + Q_UNUSED(timestamp) + Q_UNUSED(k) + Q_UNUSED(mods) + Q_UNUSED(text) + Q_UNUSED(autorep) + Q_UNUSED(count) + return false; +#endif } bool QWindowSystemInterface::tryHandleSynchronousExtendedShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods, @@ -193,11 +204,25 @@ bool QWindowSystemInterface::tryHandleSynchronousExtendedShortcutEvent(QWindow * quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text, bool autorep, ushort count) { +#ifndef QT_NO_SHORTCUT QGuiApplicationPrivate::modifier_buttons = mods; QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count); qevent.setTimestamp(timestamp); return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent); +#else + Q_UNUSED(w) + Q_UNUSED(timestamp) + Q_UNUSED(k) + Q_UNUSED(mods) + Q_UNUSED(nativeScanCode) + Q_UNUSED(nativeVirtualKey) + Q_UNUSED(nativeModifiers) + Q_UNUSED(text) + Q_UNUSED(autorep) + Q_UNUSED(count) + return false; +#endif } -- 2.7.4