summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp12
-rw-r--r--noncore/settings/aqpkg/opie-aqpkg.control2
-rw-r--r--noncore/settings/aqpkg/package.cpp1
-rw-r--r--noncore/settings/aqpkg/packagewin.cpp7
-rw-r--r--noncore/settings/aqpkg/server.cpp13
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
@@ -1013,4 +1013,9 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
1013 InstallData *newitem = new InstallData(); 1013 InstallData *newitem = new InstallData();
1014 newitem->option = "D"; 1014 newitem->option = "D";
1015
1016 // If local file, remove using package name, not filename
1017 if ( p->isPackageStoredLocally() )
1018 name = item->text();
1019
1015 if ( !p->isPackageStoredLocally() ) 1020 if ( !p->isPackageStoredLocally() )
1016 newitem->packageName = p->getInstalledPackageName(); 1021 newitem->packageName = p->getInstalledPackageName();
@@ -1042,4 +1047,8 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
1042 // Version available is older - remove only 1047 // Version available is older - remove only
1043 newitem->option = "D"; 1048 newitem->option = "D";
1049
1050 // If local file, remove using package name, not filename
1051 if ( p->isPackageStoredLocally() )
1052 name = item->text();
1044 } 1053 }
1045 else 1054 else
@@ -1081,4 +1090,7 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
1081 case 1: // Remove 1090 case 1: // Remove
1082 newitem->option = "D"; 1091 newitem->option = "D";
1092 // If local file, remove using package name, not filename
1093 if ( p->isPackageStoredLocally() )
1094 name = item->text();
1083 break; 1095 break;
1084 case 2: // Reinstall or Upgrade 1096 case 2: // Reinstall or Upgrade
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
@@ -3,5 +3,4 @@ Files: bin/aqpkg pics/aqpkg apps/Settings/aqpkg.desktop
3Priority: optional 3Priority: optional
4Section: Settings 4Section: Settings
5Version: $QPE_VERSION-$SUB_VERSION
6Depends: task-opie-minimal 5Depends: task-opie-minimal
7Replaces: aqpkg 6Replaces: aqpkg
@@ -10,2 +9,3 @@ Maintainer: Andy Qua (andy.qua@blueyonder.co.uk)
10Description: A Package Manager 9Description: A Package Manager
11 10
11Version: $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
@@ -117,4 +117,5 @@ void Package :: setVersion( const QString &v )
117{ 117{
118 version = v; 118 version = v;
119 differentVersionAvailable = false;
119 120
120 if ( localPackage ) 121 if ( localPackage )
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
@@ -45,9 +45,10 @@ PackageWindow::PackageWindow( Package *package, const QString &server )
45 if ( package ) 45 if ( package )
46 { 46 {
47 Package *local = package->getLocalPackage();
47 setCaption( package->getPackageName() ); 48 setCaption( package->getPackageName() );
48 QString destName; 49 QString destName;
49 if ( package->getLocalPackage() ) 50 if ( local )
50 { 51 {
51 if ( package->getLocalPackage()->getInstalledTo() ) 52 if ( local->getInstalledTo() )
52 destName = package->getLocalPackage()->getInstalledTo()->getDestinationName(); 53 destName = package->getLocalPackage()->getInstalledTo()->getDestinationName();
53 } 54 }
@@ -87,5 +88,5 @@ PackageWindow::PackageWindow( Package *package, const QString &server )
87 str.append( tr( "<p><b>Version Available</b> - " ) ); 88 str.append( tr( "<p><b>Version Available</b> - " ) );
88 str.append( package->getVersion() ); 89 str.append( package->getVersion() );
89 if ( package->getLocalPackage() ) 90 if ( local )
90 { 91 {
91 if ( package->isInstalled() ) 92 if ( package->isInstalled() )
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
@@ -120,5 +120,5 @@ void Server :: readLocalIpks( Server *local )
120 120
121 // Changed to display the filename (excluding the path) 121 // Changed to display the filename (excluding the path)
122 QString packageName = Utils::getFilenameFromIpkFilename( file ); 122 QString packageName = Utils::getPackageNameFromIpkFilename( file );
123 QString ver = Utils::getPackageVersionFromIpkFilename( file ); 123 QString ver = Utils::getPackageVersionFromIpkFilename( file );
124 Package *package = new Package( packageName ); 124 Package *package = new Package( packageName );
@@ -245,4 +245,7 @@ void Server :: buildLocalPackages( Server *local )
245 Package *curr; 245 Package *curr;
246 QListIterator<Package> it( packageList ); 246 QListIterator<Package> it( packageList );
247
248 QList<Package> *locallist = &local->getPackageList();
249
247 for ( ; it.current(); ++it ) 250 for ( ; it.current(); ++it )
248 { 251 {
@@ -260,4 +263,12 @@ void Server :: buildLocalPackages( Server *local )
260 if ( p ) 263 if ( p )
261 { 264 {
265 // Replace local version
266 if ( curr->getVersion() > p->getVersion() )
267 {
268 int pos = locallist->at();
269 locallist->remove( p );
270 locallist->insert( pos, curr );
271 }
272
262 // Set some default stuff like size and things 273 // Set some default stuff like size and things
263 if ( p->getInstalledVersion() == curr->getVersion() ) 274 if ( p->getInstalledVersion() == curr->getVersion() )