summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp6
-rw-r--r--noncore/settings/aqpkg/package.cpp5
-rw-r--r--noncore/settings/aqpkg/package.h19
-rw-r--r--noncore/settings/aqpkg/server.cpp2
4 files changed, 16 insertions, 16 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 6ea619c..fb40d52 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -640,6 +640,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
if ( showUpgradedPkgs )
{
- if ( !package->isInstalled() ||
- compareVersions( package->getInstalledVersion(), package->getVersion() ) != 1 )
+ if ( !package->isInstalled() || !package->getNewVersionAvailable() )
continue;
}
@@ -664,6 +663,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
// If a different version of package is available, show update available icon
// Otherwise, show installed icon
- if ( package->getVersion() != package->getInstalledVersion() &&
- compareVersions( package->getInstalledVersion(), package->getVersion() ) == 1)
+ if ( package->getNewVersionAvailable())
{
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp
index 83e0706..3395870 100644
--- a/noncore/settings/aqpkg/package.cpp
+++ b/noncore/settings/aqpkg/package.cpp
@@ -51,4 +51,5 @@ Package::Package( char *name )
installed = false;
installedTo = 0;
+ differentVersionAvailable = false;
}
@@ -90,5 +91,5 @@ void Package :: setLocalPackage( Package *p )
if ( localPackage )
- if ( localPackage->getVersion() != getVersion() )
+ if ( localPackage->getVersion() < getVersion() && !installed )
differentVersionAvailable = true;
else
@@ -101,5 +102,5 @@ void Package :: setVersion( const QString &v )
if ( localPackage )
- if ( localPackage->getVersion() != getVersion() )
+ if ( localPackage->getVersion() < getVersion() && !installed )
differentVersionAvailable = true;
else
diff --git a/noncore/settings/aqpkg/package.h b/noncore/settings/aqpkg/package.h
index f5a132f..110ae91 100644
--- a/noncore/settings/aqpkg/package.h
+++ b/noncore/settings/aqpkg/package.h
@@ -48,13 +48,14 @@ public:
void setSection( const QString &sect) { section = sect; }
- Package *getLocalPackage() { return localPackage; }
- QString getPackageName() { return packageName; }
- QString getVersion() { return version; }
- QString getStatus() { return status; }
- QString getDescription() { return description; }
- QString getFilename() { return filename; }
- QString getDependancies() { return dependancies; }
- QString getPackageSize() { return packageSize; }
- QString getSection() { return section; }
+ Package *getLocalPackage() { return localPackage; }
+ QString getPackageName() { return packageName; }
+ QString getVersion() { return version; }
+ QString getStatus() { return status; }
+ QString getDescription() { return description; }
+ QString getFilename() { return filename; }
+ QString getDependancies() { return dependancies; }
+ QString getPackageSize() { return packageSize; }
+ QString getSection() { return section; }
+ bool getNewVersionAvailable() { return differentVersionAvailable; }
bool isInstalled();
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 9a239a5..e2b8096 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -185,5 +185,5 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR
else
{
- if (currPackage->getStatus().find( "deinstall" ) != -1 )
+ if ( currPackage->isInstalled() )
currPackage->setInstalledTo( dest );
}