Logo Search packages:      
Sourcecode: qapt version File versions  Download package

qint64 QApt::Backend::downloadSize (  )  const

Queries the backend for the total size of the packages will be downloaded if the user commits changes. Cached packages will not show up in this count.

The total amount that will be downloaded in bytes.

Definition at line 270 of file backend.cpp.

    Q_D(const Backend);

    qint64 downloadSize = d->cache->depCache()->DebSize();

    pkgAcquire fetcher;
    pkgPackageManager *PM = _system->CreatePM(d->cache->depCache());
    if (PM->GetArchives(&fetcher, d->cache->list(), d->records)) {
        downloadSize = fetcher.FetchNeeded();
    delete PM;

    return downloadSize;

Generated by  Doxygen 1.6.0   Back to index