changed private part completly -> rdy win

This commit is contained in:
Skycoder42
2016-02-06 13:54:20 +01:00
parent a5eb16973d
commit e5d4d103be
6 changed files with 75 additions and 119 deletions
+4 -4
View File
@@ -9,11 +9,11 @@ public:
static OSStatus hotkeyEventHandler(EventHandlerCallRef nextHandler, EventRef event, void* data);
static bool isHotkeyHandlerRegistered;
static QHash<QHotkey::NativeShortcut, EventHotKeyRef> hotkeyRefs;
static QHash<NativeShortcut, EventHotKeyRef> hotkeyRefs;
};
bool QHotkeyPrivateNative::isHotkeyHandlerRegistered = false;
QHash<QHotkey::NativeShortcut, EventHotKeyRef> QHotkeyPrivateNative::hotkeyRefs;
QHash<NativeShortcut, EventHotKeyRef> QHotkeyPrivateNative::hotkeyRefs;
bool QHotkeyPrivate::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
{
@@ -174,7 +174,7 @@ quint32 QHotkeyPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers)
return nMods;
}
bool QHotkeyPrivate::registerShortcut(QHotkey::NativeShortcut shortcut)
bool QHotkeyPrivate::registerShortcut(NativeShortcut shortcut)
{
if (!QHotkeyPrivateNative::isHotkeyHandlerRegistered)
{
@@ -204,7 +204,7 @@ bool QHotkeyPrivate::registerShortcut(QHotkey::NativeShortcut shortcut)
}
}
bool QHotkeyPrivate::unregisterShortcut(QHotkey::NativeShortcut shortcut)
bool QHotkeyPrivate::unregisterShortcut(NativeShortcut shortcut)
{
EventHotKeyRef eventRef = QHotkeyPrivateNative::hotkeyRefs.value(shortcut);
OSStatus status = UnregisterEventHotKey(eventRef);