コード例 #1
0
ファイル: DownloadManager.cpp プロジェクト: omorel/D-LAN
QList<IDownload*> DownloadManager::getDownloads() const
{
   QList<IDownload*> listDownloads;

   // TODO: very heavy!
   for (int i = 0; i < this->downloadQueue.size(); i++)
   {
      Download* download = this->downloadQueue[i];
      if (download->getStatus() != DELETED)
         listDownloads << download;
   }

   return listDownloads;
}
コード例 #2
0
ファイル: DownloadManager.cpp プロジェクト: thexa4/D-LAN
QList<IDownload*> DownloadManager::getDownloads() const
{
   QList<IDownload*> listDownloads;

   // A bit heavy . . .
   listDownloads.reserve(this->downloadQueue.size());
   for (int i = 0; i < this->downloadQueue.size(); i++)
   {
      Download* download = this->downloadQueue[i];
      if (download->getStatus() != DELETED)
         listDownloads << download;
   }

   return listDownloads;
}