SVN commit 1207013 by jmthomas: Added an areChangesMarked() function to provide an easier way to check if there are pending changes without checking the emptiness of the QApt::PackageList that Backend::MarkedPackages() constructs and returns M +5 -0 backend.cpp M +6 -0 backend.h --- trunk/extragear/sysadmin/libqapt/src/backend.cpp #1207012:1207013 @@ -516,6 +516,11 @@ return groupList; } +bool Backend::areChangesMarked() const +{ + return (toInstallCount() + toRemoveCount()); +} + bool Backend::isBroken() const { Q_D(const Backend); --- trunk/extragear/sysadmin/libqapt/src/backend.h #1207012:1207013 @@ -325,6 +325,12 @@ bool openXapianIndex(); /** + * Returns whether there are packages with marked changes waiting to be + * committed + */ + bool areChangesMarked() const; + + /** * Returns whether the cache has broken packages or has a null dependency * cache */