mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-08 06:00:59 -07:00
Simplify natural sort classes interface
Now the comparison function/class should be constructed before usage. This change also make it easier to plug in into various containers which will require a compare function type (such as std::set).
This commit is contained in:
parent
5045fa6dcd
commit
a64bb1a990
24 changed files with 235 additions and 177 deletions
|
@ -47,6 +47,7 @@
|
|||
#include "base/rss/rss_feed.h"
|
||||
#include "base/rss/rss_folder.h"
|
||||
#include "base/rss/rss_session.h"
|
||||
#include "base/utils/compare.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "gui/autoexpandabledialog.h"
|
||||
|
@ -330,7 +331,7 @@ void AutomatedRssDownloader::initCategoryCombobox()
|
|||
{
|
||||
// Load torrent categories
|
||||
QStringList categories = BitTorrent::Session::instance()->categories().keys();
|
||||
std::sort(categories.begin(), categories.end(), Utils::String::naturalLessThan<Qt::CaseInsensitive>);
|
||||
std::sort(categories.begin(), categories.end(), Utils::Compare::NaturalLessThan<Qt::CaseInsensitive>());
|
||||
m_ui->comboCategory->addItem("");
|
||||
m_ui->comboCategory->addItems(categories);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue