summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelist.cpp
authortille <tille>2002-04-27 13:06:45 (UTC)
committer tille <tille>2002-04-27 13:06:45 (UTC)
commitdb90999f6298c1107888f062f2c25cb8817b528a (patch) (unidiff)
tree020ebe65beb9286f3c63e4329fc3a0f298d34460 /noncore/unsupported/oipkg/packagelist.cpp
parente2f3288d468508f2cf7c0a327044963ca4b1b54a (diff)
downloadopie-db90999f6298c1107888f062f2c25cb8817b528a.zip
opie-db90999f6298c1107888f062f2c25cb8817b528a.tar.gz
opie-db90999f6298c1107888f062f2c25cb8817b528a.tar.bz2
added popup menu to choose inst dest (and more...)
Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp46
1 files changed, 32 insertions, 14 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp
index 944bb83..035ec81 100644
--- a/noncore/unsupported/oipkg/packagelist.cpp
+++ b/noncore/unsupported/oipkg/packagelist.cpp
@@ -72,4 +72,4 @@ void PackageList::filterPackages( QString f )
72 if ( 72 if (
73 ((aktSection=="All")||(pack->getSection()==aktSection)) && 73 ((aktSection=="All")||(pack->section()==aktSection)) &&
74 ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) && 74 ((aktSubSection=="All")||(pack->subSection()==aktSubSection)) &&
75 pack->name().contains( f ) 75 pack->name().contains( f )
@@ -128,3 +128,3 @@ void PackageList::updateSections( Package* pack )
128{ 128{
129 QString s = pack->getSection(); 129 QString s = pack->section();
130 if ( s.isEmpty() || s == "") return; 130 if ( s.isEmpty() || s == "") return;
@@ -132,3 +132,3 @@ void PackageList::updateSections( Package* pack )
132 sections += s; 132 sections += s;
133 QString ss = pack->getSubSection(); 133 QString ss = pack->subSection();
134 if ( ss.isEmpty() || ss == "" ) return; 134 if ( ss.isEmpty() || ss == "" ) return;
@@ -152,6 +152,9 @@ void PackageList::parseStatus()
152 QStringList dests = settings->getDestinationUrls(); 152 QStringList dests = settings->getDestinationUrls();
153 for ( QStringList::Iterator it = dests.begin(); it != dests.end(); ++it ) 153 QStringList destnames = settings->getDestinationNames();
154 QStringList::Iterator name = destnames.begin();
155 for ( QStringList::Iterator dir = dests.begin(); dir != dests.end(); ++dir )
154 { 156 {
155 pvDebug( 2,"Status Dir: "+*it+statusDir+"/status"); 157 pvDebug( 2,"Status: "+*dir+statusDir+"/status");
156 readFileEntries( *it+statusDir+"/status" ); 158 readFileEntries( *dir+statusDir+"/status", *name );
159 ++name;
157 }; 160 };
@@ -165,4 +168,4 @@ void PackageList::parseList()
165 { 168 {
166 pvDebug( 2, "List Dir: "+listsDir+"/"+*it); 169 pvDebug( 2, "List: "+listsDir+"/"+*it);
167 readFileEntries( listsDir+"/"+*it ); 170 readFileEntries( listsDir+"/"+*it, "" );
168 } 171 }
@@ -170,3 +173,3 @@ void PackageList::parseList()
170 173
171void PackageList::readFileEntries( QString filename ) 174void PackageList::readFileEntries( QString filename, QString dest )
172 { 175 {
@@ -184,3 +187,4 @@ void PackageList::readFileEntries( QString filename )
184 { 187 {
185 Package *p = new Package( packEntry ); 188 Package *p = new Package( packEntry, settings );
189 p->setDest( dest );
186 if ( p ) 190 if ( p )
@@ -201,7 +205,7 @@ void PackageList::update()
201{ 205{
202 pvDebug( 3, "parseStatus"); 206 pvDebug( 2, "parseStatus");
203 parseStatus(); 207 parseStatus();
204 pvDebug( 3, "parseList"); 208 pvDebug( 2, "parseList");
205 parseList(); 209 parseList();
206 pvDebug( 3, "finished parsing"); 210 pvDebug( 2, "finished parsing");
207} 211}
@@ -223 +227,15 @@ void PackageList::clear()
223} 227}
228
229void PackageList::allPackages()
230{
231 packageList.clear();
232 QDictIterator<Package> filterIter( origPackageList );
233 filterIter.toFirst();
234 Package *pack= filterIter.current() ;
235 while ( pack )
236 {
237 packageList.insert( pack->name(), pack );
238 ++filterIter;
239 pack = filterIter.current();
240 }
241}