summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/server.cpp
authorandyq <andyq>2002-11-19 17:31:00 (UTC)
committer andyq <andyq>2002-11-19 17:31:00 (UTC)
commitabeb38c25d2cfe90d1a17912a63c9518e602766c (patch) (side-by-side diff)
tree79df89e95a7dafc4a3bf9a7e377b41467396f20d /noncore/settings/aqpkg/server.cpp
parent638b671dce5eff05a2ec666492c060fa2fd021a2 (diff)
downloadopie-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.cpp22
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
@@ -247,7 +247,21 @@ void Server :: buildLocalPackages( Server *local )
name = Utils::getPackageNameFromIpkFilename( packageList[i].getFilename() );
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 );
}
@@ -283,13 +297,7 @@ QString Server :: toString()
return ret;
-} /*
-void addAvailableSection( QString section )
-{
- if ( DataManager::availableCategories.find( value ) == -1 )
-// DataManager::availableCategories += "#" + value;
}
-*/
vector<Package> &Server::getPackageList()
{