summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/server.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/server.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/server.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 4693db1..0282236 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -121,3 +121,3 @@ void Server :: readLocalIpks( Server *local )
// Changed to display the filename (excluding the path)
- QString packageName = Utils::getFilenameFromIpkFilename( file );
+ QString packageName = Utils::getPackageNameFromIpkFilename( file );
QString ver = Utils::getPackageVersionFromIpkFilename( file );
@@ -246,2 +246,5 @@ void Server :: buildLocalPackages( Server *local )
QListIterator<Package> it( packageList );
+
+ QList<Package> *locallist = &local->getPackageList();
+
for ( ; it.current(); ++it )
@@ -261,2 +264,10 @@ void Server :: buildLocalPackages( Server *local )
{
+ // Replace local version
+ if ( curr->getVersion() > p->getVersion() )
+ {
+ int pos = locallist->at();
+ locallist->remove( p );
+ locallist->insert( pos, curr );
+ }
+
// Set some default stuff like size and things