-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/aqpkg/package.cpp | 5 | ||||
-rw-r--r-- | noncore/settings/aqpkg/package.h | 1 | ||||
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 2 |
4 files changed, 7 insertions, 7 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 @@ -641,4 +641,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) { - if ( !package->isInstalled() || - compareVersions( package->getInstalledVersion(), package->getVersion() ) != 1 ) + if ( !package->isInstalled() || !package->getNewVersionAvailable() ) continue; @@ -665,4 +664,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) // 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 @@ -52,2 +52,3 @@ Package::Package( char *name ) installedTo = 0; + differentVersionAvailable = false; } @@ -91,3 +92,3 @@ void Package :: setLocalPackage( Package *p ) if ( localPackage ) - if ( localPackage->getVersion() != getVersion() ) + if ( localPackage->getVersion() < getVersion() && !installed ) differentVersionAvailable = true; @@ -102,3 +103,3 @@ void Package :: setVersion( const QString &v ) if ( localPackage ) - if ( localPackage->getVersion() != getVersion() ) + if ( localPackage->getVersion() < getVersion() && !installed ) differentVersionAvailable = true; 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 @@ -58,2 +58,3 @@ public: QString getSection() { return section; } + bool getNewVersionAvailable() { return differentVersionAvailable; } 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 @@ -186,3 +186,3 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR { - if (currPackage->getStatus().find( "deinstall" ) != -1 ) + if ( currPackage->isInstalled() ) currPackage->setInstalledTo( dest ); |