summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelist.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp23
1 files changed, 15 insertions, 8 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
@@ -25,8 +25,6 @@ PackageList::PackageList()
25 cfg.writeEntry( "listsDir", listsDir ); 25 cfg.writeEntry( "listsDir", listsDir );
26 } 26 }
27 } 27 }
28 pvDebug( 5, "PackageList::PackageList statusDir "+statusDir);
29 pvDebug( 5, "PackageList::PackageList listsDir "+listsDir);
30 sections << "All"; 28 sections << "All";
31 subSections.insert("All", new QStringList() ); 29 subSections.insert("All", new QStringList() );
32 QStringList *ss = subSections["All"]; 30 QStringList *ss = subSections["All"];
@@ -63,7 +61,7 @@ void PackageList::insertPackage( Package* pack )
63 updateSections( pack ); 61 updateSections( pack );
64} 62}
65 63
66void PackageList::filterPackages() 64void PackageList::filterPackages( QString f )
67 { 65 {
68 packageList.clear(); 66 packageList.clear();
69 QDictIterator<Package> filterIter( origPackageList ); 67 QDictIterator<Package> filterIter( origPackageList );
@@ -71,11 +69,14 @@ void PackageList::filterPackages()
71 Package *pack= filterIter.current() ; 69 Package *pack= filterIter.current() ;
72 while ( pack ) 70 while ( pack )
73 { 71 {
74 if ( ((aktSection=="All")||(pack->getSection()==aktSection)) && 72 if (
75 ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) ) 73 ((aktSection=="All")||(pack->getSection()==aktSection)) &&
76 { 74 ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) &&
77 packageList.insert( pack->name(), pack ); 75 pack->name().contains( f )
78 } 76 )
77 {
78 packageList.insert( pack->name(), pack );
79 }
79 ++filterIter; 80 ++filterIter;
80 pack = filterIter.current(); 81 pack = filterIter.current();
81 } 82 }
@@ -214,3 +215,9 @@ Package* PackageList::getByName( QString n )
214{ 215{
215 origPackageList[n]; 216 origPackageList[n];
216} 217}
218
219void PackageList::clear()
220{
221 origPackageList.clear();
222 packageList.clear();
223}