void TorrentModel::handleTorrentAboutToBeRemoved(const Transfer &h, bool) { const int row = torrentRow(h.hash()); if (row >= 0) { emit torrentAboutToBeRemoved(m_torrents.at(row)); } }
void TorrentModel::handleTorrentAboutToBeRemoved(BitTorrent::TorrentHandle *const torrent) { const int row = torrentRow(torrent->hash()); qDebug() << Q_FUNC_INFO << row; if (row >= 0) { emit torrentAboutToBeRemoved(m_items.at(row)); beginRemoveTorrent(row); delete m_items.takeAt(row); endRemoveTorrent(); } }