summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg
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
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') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/package.cpp10
-rw-r--r--noncore/settings/aqpkg/package.h14
-rw-r--r--noncore/settings/aqpkg/server.cpp22
3 files changed, 27 insertions, 19 deletions
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp
index fd75450..526de5e 100644
--- a/noncore/settings/aqpkg/package.cpp
+++ b/noncore/settings/aqpkg/package.cpp
@@ -58,3 +58,3 @@ QString Package :: toString()
-void Package :: setStatus( QString &s )
+void Package :: setStatus( const QString &s )
{
@@ -77,3 +77,3 @@ void Package :: setLocalPackage( Package *p )
-void Package :: setVersion( QString &v )
+void Package :: setVersion( const QString &v )
{
@@ -88,3 +88,3 @@ void Package :: setVersion( QString &v )
-void Package :: setPackageName( QString &name )
+void Package :: setPackageName( const QString &name )
{
@@ -93,3 +93,3 @@ void Package :: setPackageName( QString &name )
-void Package :: setDescription( QString &d )
+void Package :: setDescription( const QString &d )
{
@@ -98,3 +98,3 @@ void Package :: setDescription( QString &d )
-void Package :: setFilename( QString &f )
+void Package :: setFilename( const QString &f )
{
diff --git a/noncore/settings/aqpkg/package.h b/noncore/settings/aqpkg/package.h
index 7545818..f5a132f 100644
--- a/noncore/settings/aqpkg/package.h
+++ b/noncore/settings/aqpkg/package.h
@@ -37,7 +37,7 @@ public:
void setLocalPackage( Package *p );
- void setPackageName( QString &name );
- void setVersion( QString &v );
- void setStatus( QString &s );
- void setDescription( QString &d );
- void setFilename( QString &f );
+ void setPackageName( const QString &name );
+ void setVersion( const QString &v );
+ void setStatus( const QString &s );
+ void setDescription( const QString &d );
+ void setFilename( const QString &f );
void setPackageStoredLocally( bool local ) { packageStoredLocally = local; }
@@ -46,4 +46,4 @@ public:
void setDependancies( QString &deps ) { dependancies = deps; }
- void setPackageSize( QString size ) { packageSize = size; }
- void setSection( QString sect) { section = sect; }
+ void setPackageSize( const QString &size ) { packageSize = size; }
+ void setSection( const QString &sect) { section = sect; }
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
@@ -249,3 +249,17 @@ 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
@@ -285,9 +299,3 @@ QString Server :: toString()
return ret;
-} /*
-void addAvailableSection( QString section )
-{
- if ( DataManager::availableCategories.find( value ) == -1 )
-// DataManager::availableCategories += "#" + value;
}
-*/