summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJeremy Katz <jeremy.katz@nokia.com>2012-06-29 13:25:31 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-16 12:14:13 +0200
commitab2a6bbca9eccc4b2fde2e3af1fb1b9f6cee5cd3 (patch)
treee31181a2734ed5abd1cfb8f6d9bd24b30a529575 /src/gui
parentc44d7eedfdfa80598c877bd2a708a8f126c25fc4 (diff)
Make qwindowsysteminterface.cpp compile with QT_NO_SHORTCUT
Task-number: QTBUG-24816 Change-Id: Ia3d20775d28922ee94f965b4a7bc993915f34d6b Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index e884d7caf9..f9eae3b765 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
}