mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06: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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user