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

QString QApt::Package::version (  )  const

Member function that returns the version of the package, regardless of whether it is installed or not. If not installed, it returns the version of the candidate for installation, which may not necessarily be the latest if the version has been changed with setVersion

Returns:
The version of the package as a QString

Definition at line 261 of file package.cpp.

Referenced by dependencyList().

{
    if ((*d->packageIter)->CurrentVer == 0) {
        pkgDepCache::StateCache & State = (*d->depCache)[*d->packageIter];
        if (State.CandidateVer == 0) {
            return QString();
        } else {
            return QString::fromStdString(State.CandidateVerIter(*d->depCache).VerStr());
        }
    } else {
        return QString::fromStdString(d->packageIter->CurrentVer().VerStr());
    }
}


Generated by  Doxygen 1.6.0   Back to index