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>
bb10
Jeremy Katz 2012-06-29 13:25:31 +02:00 committed by Qt by Nokia
parent c44d7eedfd
commit ab2a6bbca9
1 changed files with 25 additions and 0 deletions

View File

@ -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
}