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 <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2018-01-01 21:49:19 +01:00 committed by Dirk Hohndel
parent b7494bfb2e
commit 34d1dd469c

View file

@ -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));
}