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

QStringList QApt::Package::availableVersions (  )  const

Member function that returns a list of all available versions of the package in the form of "version, release" E.g. "0.2-0ubuntu1, maverick"

Returns:
All available versions of the package as a QStringList

Definition at line 275 of file package.cpp.

{
    QStringList versions;

    // Get available Versions.
    for (pkgCache::VerIterator Ver = d->packageIter->VersionList();
         Ver.end() == false; ++Ver) {

        // We always take the first available version.
        pkgCache::VerFileIterator VF = Ver.FileList();
        if (!VF.end()) {
            pkgCache::PkgFileIterator File = VF.File();

            if (File->Archive != 0) {
                versions.append(QString(Ver.VerStr()) % " (" % QString(File.Archive()) % ')');
            } else {
                versions.append(QString(Ver.VerStr()) % " (" % QString(File.Site()) % ')');
            }
        }
    }

    return versions;
}


Generated by  Doxygen 1.6.0   Back to index