mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- FEATURE: Make sure torrent files are always sorted by name
This commit is contained in:
parent
d843366c0d
commit
e9350e66f0
2 changed files with 8 additions and 1 deletions
|
@ -200,7 +200,13 @@ public:
|
|||
Q_ASSERT(item);
|
||||
//Q_ASSERT(!childWithName(item->getName()));
|
||||
Q_ASSERT(type != TFILE);
|
||||
childItems.append(item);
|
||||
int i=0;
|
||||
for(i=0; i<childItems.size(); ++i) {
|
||||
QString newchild_name = item->getName();
|
||||
if(QString::localeAwareCompare(newchild_name, childItems.at(i)->getName()) < 0) break;
|
||||
}
|
||||
childItems.insert(i, item);
|
||||
//childItems.append(item);
|
||||
//Q_ASSERT(type != ROOT || childItems.size() == 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue