Utils: Replace && with & for button tooltips

&& is used to prevent the following space from becoming a shortcut.

Change-Id: I8143b8ee193a2f2ffc391375e75d8a0fb26e8e09
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2014-11-10 11:06:16 +02:00
committed by Orgad Shaneh
parent 6f91d7772a
commit e742fd26bf

View File

@@ -174,6 +174,8 @@ void ProxyAction::updateToolTipWithKeySequence()
QString ProxyAction::stringWithAppendedShortcut(const QString &str, const QKeySequence &shortcut)
{
QString s = str;
s.replace(QLatin1String("&&"), QLatin1String("&"));
return QString::fromLatin1("%1 <span style=\"color: gray; font-size: small\">%2</span>").
arg(str, shortcut.toString(QKeySequence::NativeText));
arg(s, shortcut.toString(QKeySequence::NativeText));
}