summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelist.cpp
authortille <tille>2002-04-24 19:15:02 (UTC)
committer tille <tille>2002-04-24 19:15:02 (UTC)
commit17eb865ad8248b1f47c565b074b9b6bbbd44935b (patch) (side-by-side diff)
treec494b5050ce910df3c74e2a21c5579571792d926 /noncore/unsupported/oipkg/packagelist.cpp
parent997b7685dcc48cc36737240ca53331f83b66dbeb (diff)
downloadopie-17eb865ad8248b1f47c565b074b9b6bbbd44935b.zip
opie-17eb865ad8248b1f47c565b074b9b6bbbd44935b.tar.gz
opie-17eb865ad8248b1f47c565b074b9b6bbbd44935b.tar.bz2
added find
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()
cfg.writeEntry( "listsDir", listsDir );
}
}
- pvDebug( 5, "PackageList::PackageList statusDir "+statusDir);
- pvDebug( 5, "PackageList::PackageList listsDir "+listsDir);
sections << "All";
subSections.insert("All", new QStringList() );
QStringList *ss = subSections["All"];
@@ -63,7 +61,7 @@ void PackageList::insertPackage( Package* pack )
updateSections( pack );
}
-void PackageList::filterPackages()
+void PackageList::filterPackages( QString f )
{
packageList.clear();
QDictIterator<Package> filterIter( origPackageList );
@@ -71,11 +69,14 @@ void PackageList::filterPackages()
Package *pack= filterIter.current() ;
while ( pack )
{
- if ( ((aktSection=="All")||(pack->getSection()==aktSection)) &&
- ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) )
- {
- packageList.insert( pack->name(), pack );
- }
+ if (
+ ((aktSection=="All")||(pack->getSection()==aktSection)) &&
+ ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) &&
+ pack->name().contains( f )
+ )
+ {
+ packageList.insert( pack->name(), pack );
+ }
++filterIter;
pack = filterIter.current();
}
@@ -214,3 +215,9 @@ Package* PackageList::getByName( QString n )
{
origPackageList[n];
}
+
+void PackageList::clear()
+{
+ origPackageList.clear();
+ packageList.clear();
+}