mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
Improve error messages
* Show information about shortcut. * Make errors translatable.
This commit is contained in:
@@ -170,8 +170,7 @@ bool QHotkeyPrivateX11::registerShortcut(QHotkey::NativeShortcut shortcut)
|
||||
XSync(display, False);
|
||||
|
||||
if(errorHandler.hasError) {
|
||||
qCWarning(logQHotkey) << "Failed to register hotkey. Error:"
|
||||
<< qPrintable(errorHandler.errorString);
|
||||
error = errorHandler.errorString;
|
||||
this->unregisterShortcut(shortcut);
|
||||
return false;
|
||||
} else
|
||||
@@ -194,8 +193,7 @@ bool QHotkeyPrivateX11::unregisterShortcut(QHotkey::NativeShortcut shortcut)
|
||||
XSync(display, False);
|
||||
|
||||
if(errorHandler.hasError) {
|
||||
qCWarning(logQHotkey) << "Failed to unregister hotkey. Error:"
|
||||
<< qPrintable(errorHandler.errorString);
|
||||
error = errorHandler.errorString;
|
||||
return false;
|
||||
} else
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user