Browse Source

Sort labels with `naturalCompare()`. Closes #3919.

adaptive-webui-19844
Chocobo1 9 years ago
parent
commit
c3bde7c910
  1. 2
      src/gui/transferlistwidget.cpp

2
src/gui/transferlistwidget.cpp

@ -769,7 +769,7 @@ void TransferListWidget::displayListMenu(const QPoint&)
listMenu.addAction(&actionRename); listMenu.addAction(&actionRename);
// Category Menu // Category Menu
QStringList categories = BitTorrent::Session::instance()->categories(); QStringList categories = BitTorrent::Session::instance()->categories();
std::sort(categories.begin(), categories.end(), Utils::String::NaturalCompare()); std::sort(categories.begin(), categories.end(), Utils::String::naturalCompare);
QList<QAction*> categoryActions; QList<QAction*> categoryActions;
QMenu *categoryMenu = listMenu.addMenu(GuiIconProvider::instance()->getIcon("view-categories"), tr("Category")); QMenu *categoryMenu = listMenu.addMenu(GuiIconProvider::instance()->getIcon("view-categories"), tr("Category"));
categoryActions << categoryMenu->addAction(GuiIconProvider::instance()->getIcon("list-add"), tr("New...", "New category...")); categoryActions << categoryMenu->addAction(GuiIconProvider::instance()->getIcon("list-add"), tr("New...", "New category..."));

Loading…
Cancel
Save