forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
6f91d7772a
commit
e742fd26bf
@@ -174,6 +174,8 @@ void ProxyAction::updateToolTipWithKeySequence()
|
|||||||
|
|
||||||
QString ProxyAction::stringWithAppendedShortcut(const QString &str, const QKeySequence &shortcut)
|
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>").
|
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));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user