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

PackageList QApt::Backend::markedPackages (  )  const

Queries the backend for a list of all packages that have been marked for change. (To be installed, removed, etc)

Returns:
A PackageList of all marked packages in the Apt database

Definition at line 317 of file backend.cpp.

References package(), QApt::Package::state(), QApt::Package::ToDowngrade, QApt::Package::ToInstall, QApt::Package::ToPurge, QApt::Package::ToReInstall, QApt::Package::ToRemove, and QApt::Package::ToUpgrade.

{
    Q_D(const Backend);

    PackageList markedPackages;

    foreach(Package *package, d->packages) {
        if (package->state() & (Package::ToInstall | Package::ToReInstall |
                                Package::ToUpgrade | Package::ToDowngrade |
                                Package::ToRemove | Package::ToPurge)) {
            markedPackages << package;
        }
    }
    return markedPackages;
}


Generated by  Doxygen 1.6.0   Back to index