mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
Merge pull request #3455 from Chocobo1/label_fix
Fix '&' character in label name becomes accelerator key, closes #3454.
This commit is contained in:
commit
bf3a6d1c20
1 changed files with 3 additions and 1 deletions
|
@ -750,8 +750,10 @@ void TransferListWidget::displayListMenu(const QPoint&)
|
||||||
labelActions << labelMenu->addAction(GuiIconProvider::instance()->getIcon("list-add"), tr("New...", "New label..."));
|
labelActions << labelMenu->addAction(GuiIconProvider::instance()->getIcon("list-add"), tr("New...", "New label..."));
|
||||||
labelActions << labelMenu->addAction(GuiIconProvider::instance()->getIcon("edit-clear"), tr("Reset", "Reset label"));
|
labelActions << labelMenu->addAction(GuiIconProvider::instance()->getIcon("edit-clear"), tr("Reset", "Reset label"));
|
||||||
labelMenu->addSeparator();
|
labelMenu->addSeparator();
|
||||||
foreach (const QString &label, customLabels)
|
foreach (QString label, customLabels) {
|
||||||
|
label.replace('&', "&&"); // avoid '&' becomes accelerator key
|
||||||
labelActions << labelMenu->addAction(GuiIconProvider::instance()->getIcon("inode-directory"), label);
|
labelActions << labelMenu->addAction(GuiIconProvider::instance()->getIcon("inode-directory"), label);
|
||||||
|
}
|
||||||
listMenu.addSeparator();
|
listMenu.addSeparator();
|
||||||
if (one_not_seed)
|
if (one_not_seed)
|
||||||
listMenu.addAction(&actionSet_download_limit);
|
listMenu.addAction(&actionSet_download_limit);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue