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

bool QApt::Package::setVersion ( const QString &  version  ) 

Overrides the candidate version, setting it to the version string

Definition at line 940 of file package.cpp.

References OverrideVersion.

{
    bool isDefault = (version == d->defaultCandVer);
    pkgVersionMatch Match(version.toStdString(), pkgVersionMatch::Version);
    pkgCache::VerIterator Ver = Match.Find(*d->packageIter);

    if (Ver.end() == true) {
        return false;
    }

    d->depCache->SetCandidateVersion(Ver);

    if (isDefault) {
        d->state &= ~OverrideVersion;
    } else {
        d->state |= OverrideVersion;
    }

    return true;
}


Generated by  Doxygen 1.6.0   Back to index