mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
logging update
use QLoggingCategory now to provides improved logging
This commit is contained in:
@@ -206,8 +206,9 @@ bool QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut shortcut)
|
||||
GetApplicationEventTarget(),
|
||||
0,
|
||||
&eventRef);
|
||||
if (status != noErr) {
|
||||
qWarning() << "QHotkey: Failed to register hotkey. Error:" << status;
|
||||
if (status != noErr) {
|
||||
qCWarning(logQHotkey) << "Failed to register hotkey. Error:"
|
||||
<< status;
|
||||
return false;
|
||||
} else {
|
||||
this->hotkeyRefs.insert(shortcut, eventRef);
|
||||
@@ -219,8 +220,9 @@ 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. Error:" << status;
|
||||
if (status != noErr) {
|
||||
qCWarning(logQHotkey) << "Failed to unregister hotkey. Error:"
|
||||
<< status;
|
||||
return false;
|
||||
} else {
|
||||
this->hotkeyRefs.remove(shortcut);
|
||||
|
||||
Reference in New Issue
Block a user