-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 12 | ||||
-rw-r--r-- | noncore/settings/aqpkg/opie-aqpkg.control | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/package.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/aqpkg/packagewin.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 13 |
5 files changed, 30 insertions, 5 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 45a6663..42093cf 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp @@ -1014,2 +1014,7 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) newitem->option = "D"; + + // If local file, remove using package name, not filename + if ( p->isPackageStoredLocally() ) + name = item->text(); + if ( !p->isPackageStoredLocally() ) @@ -1043,2 +1048,6 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) newitem->option = "D"; + + // If local file, remove using package name, not filename + if ( p->isPackageStoredLocally() ) + name = item->text(); } @@ -1082,2 +1091,5 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) newitem->option = "D"; + // If local file, remove using package name, not filename + if ( p->isPackageStoredLocally() ) + name = item->text(); break; diff --git a/noncore/settings/aqpkg/opie-aqpkg.control b/noncore/settings/aqpkg/opie-aqpkg.control index b8ad1e8..46bffdd 100644 --- a/noncore/settings/aqpkg/opie-aqpkg.control +++ b/noncore/settings/aqpkg/opie-aqpkg.control @@ -4,3 +4,2 @@ Priority: optional Section: Settings -Version: $QPE_VERSION-$SUB_VERSION Depends: task-opie-minimal @@ -11 +10,2 @@ Description: A Package Manager +Version: $QPE_VERSION$EXTRAVERSION diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp index adda832..5a521d3 100644 --- a/noncore/settings/aqpkg/package.cpp +++ b/noncore/settings/aqpkg/package.cpp @@ -118,2 +118,3 @@ void Package :: setVersion( const QString &v ) version = v; + differentVersionAvailable = false; diff --git a/noncore/settings/aqpkg/packagewin.cpp b/noncore/settings/aqpkg/packagewin.cpp index 9553cd1..499d647 100644 --- a/noncore/settings/aqpkg/packagewin.cpp +++ b/noncore/settings/aqpkg/packagewin.cpp @@ -46,7 +46,8 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) { + Package *local = package->getLocalPackage(); setCaption( package->getPackageName() ); QString destName; - if ( package->getLocalPackage() ) + if ( local ) { - if ( package->getLocalPackage()->getInstalledTo() ) + if ( local->getInstalledTo() ) destName = package->getLocalPackage()->getInstalledTo()->getDestinationName(); @@ -88,3 +89,3 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) str.append( package->getVersion() ); - if ( package->getLocalPackage() ) + if ( local ) { 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 |