mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
[GUI] Implement stable sort (#7703)
* NaturalCompare now returns compare result instead of "less than" result * Change to stable sort in GUI components * Add Utils::String::naturalLessThan() helper function * Use Qt::CaseSensitivity type
This commit is contained in:
parent
74d281526b
commit
eac8838dc2
12 changed files with 184 additions and 154 deletions
|
@ -128,7 +128,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||
|
||||
// Load categories
|
||||
QStringList categories = session->categories().keys();
|
||||
std::sort(categories.begin(), categories.end(), Utils::String::naturalCompareCaseInsensitive);
|
||||
std::sort(categories.begin(), categories.end(), Utils::String::naturalLessThan<Qt::CaseInsensitive>);
|
||||
QString defaultCategory = settings()->loadValue(KEY_DEFAULTCATEGORY).toString();
|
||||
|
||||
if (!m_torrentParams.category.isEmpty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue