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
@@ -267,8 +267,7 @@ bool QHotkeyPrivateWin::registerShortcut(QHotkey::NativeShortcut shortcut)
if(ok)
return true;
else {
qCWarning(logQHotkey) << "Failed to register hotkey. Error:"
<< qPrintable(QHotkeyPrivateWin::formatWinError(::GetLastError()));
error = QHotkeyPrivateWin::formatWinError(::GetLastError());
return false;
}
}
@@ -279,8 +278,7 @@ bool QHotkeyPrivateWin::unregisterShortcut(QHotkey::NativeShortcut shortcut)
if(ok)
return true;
else {
qCWarning(logQHotkey) << "Failed to unregister hotkey. Error:"
<< qPrintable(QHotkeyPrivateWin::formatWinError(::GetLastError()));
error = QHotkeyPrivateWin::formatWinError(::GetLastError());
return false;
}
}