Diffstat (limited to 'noncore/settings/aqpkg/server.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp index 539ebf0..7c3257b 100644 --- a/noncore/settings/aqpkg/server.cpp +++ b/noncore/settings/aqpkg/server.cpp | |||
@@ -25,12 +25,13 @@ | |||
25 | 25 | ||
26 | #include <iostream> | 26 | #include <iostream> |
27 | #include <fstream> | 27 | #include <fstream> |
28 | using namespace std; | 28 | using namespace std; |
29 | 29 | ||
30 | #include "server.h" | 30 | #include "server.h" |
31 | #include "datamgr.h" | ||
31 | 32 | ||
32 | #ifdef QWS | 33 | #ifdef QWS |
33 | #include <qpe/global.h> | 34 | #include <qpe/global.h> |
34 | #include <qpe/applnk.h> | 35 | #include <qpe/applnk.h> |
35 | #include <qlist.h> | 36 | #include <qlist.h> |
36 | #endif | 37 | #endif |
@@ -207,13 +208,25 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR | |||
207 | currPackage->setDescription( value ); | 208 | currPackage->setDescription( value ); |
208 | } | 209 | } |
209 | else if ( key == "Filename" ) | 210 | else if ( key == "Filename" ) |
210 | { | 211 | { |
211 | if ( currPackage ) | 212 | if ( currPackage ) |
212 | currPackage->setFilename( value ); | 213 | currPackage->setFilename( value ); |
213 | } | 214 | } |
215 | else if ( key == "Size" ) | ||
216 | { | ||
217 | if ( currPackage ) | ||
218 | currPackage->setPackageSize( value ); | ||
219 | } | ||
220 | else if ( key == "Section" ) | ||
221 | { | ||
222 | if ( currPackage ) | ||
223 | currPackage->setSection( value ); | ||
224 | |||
225 | DataManager::setAvailableCategories( value ); | ||
226 | } | ||
214 | else if ( key == "" ) | 227 | else if ( key == "" ) |
215 | { | 228 | { |
216 | newPackage = true; | 229 | newPackage = true; |
217 | } | 230 | } |
218 | } while ( !in.eof() ); | 231 | } while ( !in.eof() ); |
219 | 232 | ||
@@ -267,13 +280,19 @@ QString Server :: toString() | |||
267 | 280 | ||
268 | for ( unsigned int i = 0 ; i < packageList.size() ; ++i ) | 281 | for ( unsigned int i = 0 ; i < packageList.size() ; ++i ) |
269 | ret += "\n " + packageList[i].toString(); | 282 | ret += "\n " + packageList[i].toString(); |
270 | 283 | ||
271 | 284 | ||
272 | return ret; | 285 | return ret; |
286 | } /* | ||
287 | void addAvailableSection( QString section ) | ||
288 | { | ||
289 | if ( DataManager::availableCategories.find( value ) == -1 ) | ||
290 | // DataManager::availableCategories += "#" + value; | ||
273 | } | 291 | } |
292 | */ | ||
274 | 293 | ||
275 | vector<Package> &Server::getPackageList() | 294 | vector<Package> &Server::getPackageList() |
276 | { | 295 | { |
277 | return packageList; | 296 | return packageList; |
278 | } | 297 | } |
279 | 298 | ||