Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 46 |
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 | ||
171 | void PackageList::readFileEntries( QString filename ) | 174 | void 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 | |||
229 | void 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 | } | ||