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

Package * QApt::Backend::package ( const QString &  name  )  const

Queries the backend for a Package object for the specified name.

_WARNING_ : Note that if a package with a given name cannot be found, a null pointer will be returned. Also, please note that certain actions like reloading the cache may invalidate the pointer.

name name used to specify the package returned
A pointer to a Package defined by the specified name

Definition at line 209 of file backend.cpp.

Referenced by commitChanges(), markedPackages(), markPackageForInstall(), markPackageForRemoval(), packageCount(), search(), and upgradeablePackages().

    Q_D(const Backend);

    pkgCache::PkgIterator pkg = d->cache->depCache()->FindPkg(name.toStdString());
    if (!pkg.end()) {
        return package(pkg);

    return 0;

Generated by  Doxygen 1.6.0   Back to index