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

QString QApt::Package::component (  )  const

Member function that returns the archive component of the package.

Returns:
The archive component of the package as a QString

Definition at line 371 of file package.cpp.

Referenced by isSupported().

{
    pkgCache::VerIterator Ver;
    pkgDepCache::StateCache & State = (*d->depCache)[*d->packageIter];
    if (State.CandidateVer == 0) {
        return QString();
    }
    Ver = State.CandidateVerIter(*d->depCache);
    pkgCache::VerFileIterator VF = Ver.FileList();
    pkgCache::PkgFileIterator File = VF.File();

    if(File.Component() == NULL) {
        return QString();
    }

    QString res = QString::fromStdString(File.Component());

    return res;
}


Generated by  Doxygen 1.6.0   Back to index