From 34d1dd469c5637c848e5dcecfab0dd56c26a3f4a Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Mon, 1 Jan 2018 21:49:19 +0100 Subject: Enable translation of ctrl key name for tool tip in dive notes This really enables the translation of the ctrl key name. Signed-off-by: Stefan Fuchs --- desktop-widgets/simplewidgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index af37b5154..446a3a468 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -677,7 +677,7 @@ void TextHyperlinkEventFilter::handleUrlTooltip(const QString &urlStr, const QPo } else { // per Qt docs, QKeySequence::toString does localization "tr()" on strings like Ctrl. // Note: Qt knows that on Mac OSX, ctrl (and Control) are the command key. - const QString ctrlKeyName = QKeySequence(Qt::CTRL).toString(); + const QString ctrlKeyName = QKeySequence(Qt::CTRL).toString(QKeySequence::NativeText); // ctrlKeyName comes with a trailing '+', as in: 'Ctrl+' QToolTip::showText(pos, tr("%1click to visit %2").arg(ctrlKeyName).arg(urlStr)); } -- cgit v1.2.3-70-g09d2