Improve error messages

* Show information about shortcut.
* Make errors translatable.
This commit is contained in:
Shatur95
2020-07-01 23:16:13 +03:00
parent c373d83c36
commit 483e07365e
5 changed files with 18 additions and 16 deletions
+2 -4
View File
@@ -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;