author | drw <drw> | 2003-03-27 02:13:19 (UTC) |
---|---|---|
committer | drw <drw> | 2003-03-27 02:13:19 (UTC) |
commit | 72673ba6769cef021f23002cb0a8e1545ee43632 (patch) (side-by-side diff) | |
tree | ce11217c6ad7c55c0b9f2a443bd49586636b8640 | |
parent | 0fc0190f424cf7e05f82a5c506db74c1e7f98e3b (diff) | |
download | opie-72673ba6769cef021f23002cb0a8e1545ee43632.zip opie-72673ba6769cef021f23002cb0a8e1545ee43632.tar.gz opie-72673ba6769cef021f23002cb0a8e1545ee43632.tar.bz2 |
Fix bug #780 - correctly identify whether a package is really installed or not
-rw-r--r-- | noncore/settings/aqpkg/package.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp index db3e927..99187ac 100644 --- a/noncore/settings/aqpkg/package.cpp +++ b/noncore/settings/aqpkg/package.cpp @@ -11,126 +11,126 @@ * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "package.h" #include "global.h" Package::Package( QString &name ) { packageName = name; version = "N/A"; description = "N/A"; packageSize = "N/A"; section = "N/A"; localPackage = 0; installed = false; packageStoredLocally = false; installedToRoot = false; installed = false; installedTo = 0; } Package::Package( char *name ) { packageName = name; version = "N/A"; description = "N/A"; packageSize = "N/A"; section = "N/A"; localPackage = 0; installed = false; packageStoredLocally = false; installedToRoot = false; installed = false; installedTo = 0; } Package::~Package() { } QString Package :: toString() { QString ret = "Package - " + getPackageName() + "\n version - " + getVersion(); if ( localPackage ) ret += "\n inst version - " + localPackage->getVersion(); return ret; } void Package :: setStatus( const QString &s ) { status = s; - if ( status.find( "installed" ) != -1 ) + if ( status.find( "ok installed" ) != -1 ) installed = true; } void Package :: setLocalPackage( Package *p ) { localPackage = p; if ( localPackage ) if ( localPackage->getVersion() != getVersion() ) differentVersionAvailable = true; else differentVersionAvailable = false; } void Package :: setVersion( const QString &v ) { version = v; if ( localPackage ) if ( localPackage->getVersion() != getVersion() ) differentVersionAvailable = true; else differentVersionAvailable = false; } void Package :: setPackageName( const QString &name ) { packageName = name; } void Package :: setDescription( const QString &d ) { description = d; } void Package :: setFilename( const QString &f ) { filename = f; } QString Package :: getInstalledVersion() { if ( localPackage ) return localPackage->getVersion(); else return getVersion(); } QString Package :: getInstalledPackageName() { if ( localPackage ) return localPackage->getPackageName(); else return getPackageName(); } bool Package :: isInstalled() { return installed || ( localPackage && localPackage->isInstalled() ); } |