Fix () added to action name without shortcuts

parent becb2f6f
......@@ -782,7 +782,7 @@ void MainWindow::updateActionsToolTip()
// find the shortcut pattern and delete (note the preceding space in the RegEx)
QString strippedTooltip = tempAction->toolTip().remove(QRegExp(QStringLiteral("\\s\\(.*\\)")));
// append shortcut if it exists for action
if (tempAction->shortcut() == QKeySequence(0)) {
if (tempAction->shortcut() == QKeySequence()) {
tempAction->setToolTip(strippedTooltip);
} else {
tempAction->setToolTip(strippedTooltip + QStringLiteral(" (") + tempAction->shortcut().toString() + QLatin1Char(')'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment