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

QApt::Package::Package ( QApt::Backend parent,
pkgDepCache *  depcache,
pkgRecords *  records,
pkgCache::PkgIterator &  packageIter 
)

Default constructor

Definition at line 116 of file package.cpp.

References state().

        : d(new PackagePrivate())
{
    // Passing the pkgIter by pointer from Backend results in a crash
    // the first time you try to call a method needing it :(
    // Probably because the pointer is created inside an iterator and
    // is very temporary.
    d->packageIter = new pkgCache::PkgIterator(packageIter);
    d->backend = backend;
    d->records= records;
    d->depCache = depCache;
    d->state = 0;

    pkgDepCache::StateCache &state = (*d->depCache)[*d->packageIter];
    if (state.CandVersion != NULL) {
        d->defaultCandVer = state.CandVersion;
    }
}


Generated by  Doxygen 1.6.0   Back to index