Changeset View
Changeset View
Standalone View
Standalone View
globalshortcuts.cpp
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Line(s) | 232 | { | |||
---|---|---|---|---|---|
240 | } | 240 | } | ||
241 | it2.value()->invoke(); | 241 | it2.value()->invoke(); | ||
242 | return true; | 242 | return true; | ||
243 | } | 243 | } | ||
244 | 244 | | |||
245 | bool GlobalShortcutsManager::processKey(Qt::KeyboardModifiers mods, int keyQt) | 245 | bool GlobalShortcutsManager::processKey(Qt::KeyboardModifiers mods, int keyQt) | ||
246 | { | 246 | { | ||
247 | if (m_kglobalAccelInterface) { | 247 | if (m_kglobalAccelInterface) { | ||
248 | if (!keyQt && !mods) { | ||||
249 | return false; | ||||
250 | } | ||||
248 | auto check = [this] (Qt::KeyboardModifiers mods, int keyQt) { | 251 | auto check = [this] (Qt::KeyboardModifiers mods, int keyQt) { | ||
249 | bool retVal = false; | 252 | bool retVal = false; | ||
250 | QMetaObject::invokeMethod(m_kglobalAccelInterface, | 253 | QMetaObject::invokeMethod(m_kglobalAccelInterface, | ||
251 | "checkKeyPressed", | 254 | "checkKeyPressed", | ||
252 | Qt::DirectConnection, | 255 | Qt::DirectConnection, | ||
253 | Q_RETURN_ARG(bool, retVal), | 256 | Q_RETURN_ARG(bool, retVal), | ||
254 | Q_ARG(int, int(mods) | keyQt)); | 257 | Q_ARG(int, int(mods) | keyQt)); | ||
255 | return retVal; | 258 | return retVal; | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |