MCPcopy Create free account
hub / github.com/KikoPlayProject/KikoPlay / getCheckedFileSize

Method getCheckedFileSize

Download/torrent.cpp:400–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400qint64 TorrentFileModel::getCheckedFileSize()
401{
402 QList<TorrentFile *> items;
403 items.push_back(root);
404 qint64 checkedFileSize=0;
405 while(!items.empty())
406 {
407 TorrentFile *currentItem=items.takeFirst();
408 for(TorrentFile *child:currentItem->children)
409 {
410 if(child->children.count()>0)
411 items.push_back(child);
412 else if(child->index>0 && child->checkStatus==Qt::Checked)
413 checkedFileSize+=child->size;
414 }
415 }
416 return checkedFileSize;
417}
418
419void TorrentFileModel::setNormColor(const QColor &color)
420{

Callers 1

SelectTorrentFileMethod · 0.80

Calls 2

countMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected