diff --git a/src/gui/addtorrentform.cpp b/src/gui/addtorrentform.cpp index b29ec90..4d29723 100644 --- a/src/gui/addtorrentform.cpp +++ b/src/gui/addtorrentform.cpp @@ -78,7 +78,8 @@ void AddTorrentForm::initialize() auto* contentDelegate = new PropListDelegate(this); ui->treeTorrentContent->setItemDelegate(contentDelegate); - VERIFY(connect(ui->treeTorrentContent, SIGNAL(clicked(const QModelIndex&)), ui->treeTorrentContent, SLOT(edit(const QModelIndex&)))); + VERIFY(connect(ui->treeTorrentContent, SIGNAL(clicked(const QModelIndex&)), + ui->treeTorrentContent, SLOT(edit(const QModelIndex&)))); // List files in torrent m_contentModel->model()->setupModelData(*m_torrentInfo, libtorrent::torrent_status()); diff --git a/src/logic/torrentcontentmodelitem.cpp b/src/logic/torrentcontentmodelitem.cpp index be7ec57..b79141a 100644 --- a/src/logic/torrentcontentmodelitem.cpp +++ b/src/logic/torrentcontentmodelitem.cpp @@ -284,16 +284,7 @@ void TorrentContentModelItem::appendChild(TorrentContentModelItem* item) { Q_ASSERT(item); Q_ASSERT(m_type != TFILE); - int i = 0; - for (; i < m_childItems.size(); ++i) - { - QString newchild_name = item->getName(); - if (QString::localeAwareCompare(newchild_name, m_childItems.at(i)->getName()) < 0) - { - break; - } - } - m_childItems.insert(i, item); + m_childItems.append(item); } TorrentContentModelItem* TorrentContentModelItem::child(int row) const