Prevent all '&' in Dolphin menu

This commit is contained in:
Martchus 2018-11-30 17:47:12 +01:00
parent 388b3ef6b1
commit a21d273ae1
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ void SyncthingInfoWidget::updateFromSender()
void SyncthingInfoWidget::updateFromAction(const SyncthingInfoAction *action)
{
auto text(action->text());
m_textLabel->setText(text.startsWith(QChar('&')) ? text.mid(1) : std::move(text));
text.replace(QChar('&'), QString()); // FIXME: find a better way to get rid of '&' in QAction::text()
m_textLabel->setText(std::move(text));
m_iconLabel->setPixmap(action->icon().pixmap(16));
setVisible(action->isVisible());
}