void DownloadQueue::remove(int position) { this->updateMarkersRemove(position); Download* download = (*this)[position]; if (FileDownload* fileDownload = dynamic_cast<FileDownload*>(download)) this->downloadsSortedByTime.remove(fileDownload->getLastTimeGetAllUnfinishedChunks(), fileDownload); this->downloadsIndexedByName.remove(download->getLocalEntry().name(), download); this->downloadsIndexedBySourcePeer.remove(download->getPeerSource(), download); this->downloads.removeAt(position); this->erroneousDownloads.removeOne(download); }