Browse Source

- FEATURE: Make sure torrent files are always sorted by name

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
e9350e66f0
  1. 1
      Changelog
  2. 8
      src/TorrentFilesModel.h

1
Changelog

@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
- FEATURE: Folder scanning now works with CIFS and NFS mounted folders
- FEATURE: Speed up qBittorrent startup
- FEATURE: Display per-torrent peer list
- FEATURE: Make sure torrent files are always sorted by name
- COSMETIC: Merged download / upload lists
- COSMETIC: Torrents can be filtered based on their status
- COSMETIC: Torrent properties are now displayed in main window

8
src/TorrentFilesModel.h

@ -200,7 +200,13 @@ public: @@ -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…
Cancel
Save