mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Make TorrentContentModel populating more efficient
Step to improve issue #24.
This commit is contained in:
parent
e0114ebffc
commit
d849ac32f9
1 changed files with 1 additions and 8 deletions
|
@ -70,14 +70,7 @@ const QList<TorrentContentModelItem*>& TorrentContentModelFolder::children() con
|
|||
void TorrentContentModelFolder::appendChild(TorrentContentModelItem* item)
|
||||
{
|
||||
Q_ASSERT(item);
|
||||
|
||||
int i=0;
|
||||
for ( ; i < m_childItems.size(); ++i) {
|
||||
QString newchild_name = item->name();
|
||||
if (QString::localeAwareCompare(newchild_name, m_childItems.at(i)->name()) < 0)
|
||||
break;
|
||||
}
|
||||
m_childItems.insert(i, item);
|
||||
m_childItems.append(item);
|
||||
}
|
||||
|
||||
TorrentContentModelItem* TorrentContentModelFolder::child(int row) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue