added X11 implementation

This commit is contained in:
Skycoder42
2016-02-06 19:31:50 +01:00
parent fc66c9229f
commit 7a9d6b6467
6 changed files with 192 additions and 12 deletions
+4 -4
View File
@@ -206,8 +206,8 @@ bool QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut shortcut)
GetApplicationEventTarget(),
0,
&eventRef);
if (status != noErr) {
qWarning() << "QHotkey: Failed to register hotkey with error:" << status;
if (status != noErr) {
qWarning() << "QHotkey: Failed to register hotkey. Error:" << status;
return false;
} else {
this->hotkeyRefs.insert(shortcut, eventRef);
@@ -219,8 +219,8 @@ bool QHotkeyPrivateMac::unregisterShortcut(QHotkey::NativeShortcut shortcut)
{
EventHotKeyRef eventRef = QHotkeyPrivateMac::hotkeyRefs.value(shortcut);
OSStatus status = UnregisterEventHotKey(eventRef);
if (status != noErr) {
qWarning() << "QHotkey: Failed to unregister hotkey with error:" << status;
if (status != noErr) {
qWarning() << "QHotkey: Failed to unregister hotkey. Error:" << status;
return false;
} else {
this->hotkeyRefs.remove(shortcut);