Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index 5f6934d..944bb83 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp @@ -26,6 +26,4 @@ PackageList::PackageList() } } - pvDebug( 5, "PackageList::PackageList statusDir "+statusDir); - pvDebug( 5, "PackageList::PackageList listsDir "+listsDir); sections << "All"; subSections.insert("All", new QStringList() ); @@ -64,5 +62,5 @@ void PackageList::insertPackage( Package* pack ) } -void PackageList::filterPackages() +void PackageList::filterPackages( QString f ) { packageList.clear(); @@ -72,6 +70,9 @@ void PackageList::filterPackages() while ( pack ) { - if ( ((aktSection=="All")||(pack->getSection()==aktSection)) && - ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) ) + if ( + ((aktSection=="All")||(pack->getSection()==aktSection)) && + ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) && + pack->name().contains( f ) + ) { packageList.insert( pack->name(), pack ); @@ -215,2 +216,8 @@ Package* PackageList::getByName( QString n ) origPackageList[n]; } + +void PackageList::clear() +{ + origPackageList.clear(); + packageList.clear(); +} |