author | andyq <andyq> | 2002-11-19 17:31:00 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-11-19 17:31:00 (UTC) |
commit | abeb38c25d2cfe90d1a17912a63c9518e602766c (patch) (side-by-side diff) | |
tree | 79df89e95a7dafc4a3bf9a7e377b41467396f20d /noncore/settings/aqpkg/server.cpp | |
parent | 638b671dce5eff05a2ec666492c060fa2fd021a2 (diff) | |
download | opie-abeb38c25d2cfe90d1a17912a63c9518e602766c.zip opie-abeb38c25d2cfe90d1a17912a63c9518e602766c.tar.gz opie-abeb38c25d2cfe90d1a17912a63c9518e602766c.tar.bz2 |
Changed so that the size of a package is passed down into the local package
(as long as the package installed is the same version as the package
available in the feed)
Diffstat (limited to 'noncore/settings/aqpkg/server.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp index 7c3257b..726cf00 100644 --- a/noncore/settings/aqpkg/server.cpp +++ b/noncore/settings/aqpkg/server.cpp @@ -248,5 +248,19 @@ void Server :: buildLocalPackages( Server *local ) if ( local ) - packageList[i].setLocalPackage( local->getPackage( name ) ); + { + Package *p = local->getPackage( name ); + packageList[i].setLocalPackage( p ); + if ( p ) + { + // Set some default stuff like size and things + if ( p->getInstalledVersion() == packageList[i].getVersion() ) + { + p->setPackageSize( packageList[i].getPackageSize() ); + p->setSection( packageList[i].getSection() ); + p->setDescription( packageList[i].getDescription() ); + } + } + + } else packageList[i].setLocalPackage( 0 ); @@ -284,11 +298,5 @@ QString Server :: toString() return ret; -} /* -void addAvailableSection( QString section ) -{ - if ( DataManager::availableCategories.find( value ) == -1 ) -// DataManager::availableCategories += "#" + value; } -*/ vector<Package> &Server::getPackageList() |