add package installedSize
ClosedPublic

Authored by vanini on Jun 19 2018, 9:42 AM.

Details

Summary

Returns the expected install size of the package independently of the
package being currently installed or not.

Diff Detail

Repository
R548 QAPT Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vanini requested review of this revision.Jun 19 2018, 9:42 AM
vanini created this revision.
vanini added a subscriber: sitter.

@sitter as for your comment on D13419, this patch adds the convenience function you mention.

sitter accepted this revision.Jun 19 2018, 10:08 AM

I'd write that as

const pkgCache::VerIterator &ver = d->packageIter.CurrentVer();
if (!ver.end()) {
    return qint64(ver->InstalledSize);
}

return availableInstalledSize();

easier on the eyes IMO. Looks good either way though. Thanks πŸ‘

This revision is now accepted and ready to land.Jun 19 2018, 10:08 AM
This revision was automatically updated to reflect the committed changes.