qt: Remove the keyboard shortcut translation hack
No longer needed since the Win32 UI is gone and Qt can handle the key names since the base translations are embedded
This commit is contained in:
@@ -28,22 +28,7 @@ public:
|
||||
QString translate(const char *context, const char *sourceText,
|
||||
const char *disambiguation = nullptr, int n = -1) const override
|
||||
{
|
||||
if (strcmp(sourceText, "&Fullscreen") == 0)
|
||||
sourceText = "&Fullscreen\tCtrl+Alt+PgUp";
|
||||
if (strcmp(sourceText, "&Ctrl+Alt+Del") == 0)
|
||||
sourceText = "&Ctrl+Alt+Del\tCtrl+F12";
|
||||
if (strcmp(sourceText, "Take s&creenshot") == 0)
|
||||
sourceText = "Take s&creenshot\tCtrl+F11";
|
||||
if (strcmp(sourceText, "Begin trace") == 0)
|
||||
sourceText = "Begin trace\tCtrl+T";
|
||||
if (strcmp(sourceText, "End trace") == 0)
|
||||
sourceText = "End trace\tCtrl+T";
|
||||
QString finalstr = QTranslator::translate("", sourceText, disambiguation, n);
|
||||
#ifdef Q_OS_MACOS
|
||||
if (finalstr.contains('\t'))
|
||||
finalstr.truncate(finalstr.indexOf('\t'));
|
||||
#endif
|
||||
return finalstr;
|
||||
return QTranslator::translate("", sourceText, disambiguation, n);
|
||||
}
|
||||
};
|
||||
static CustomTranslator *translator;
|
||||
|
||||
Reference in New Issue
Block a user