Diffstat (limited to 'noncore/settings/aqpkg/package.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/package.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp index 48b6934..fd75450 100644 --- a/noncore/settings/aqpkg/package.cpp +++ b/noncore/settings/aqpkg/package.cpp @@ -14,32 +14,39 @@ * (at your option) any later version. * * * ***************************************************************************/ #include "package.h" #include "global.h" Package::Package( QString &name ) { packageName = name; localPackage = 0; installed = false; - packageStoredLocally = false; + packageStoredLocally = false; installedToRoot = false; + installed = false; + installedTo = 0; } Package::Package( char *name ) { packageName = name; 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 ) @@ -94,16 +101,24 @@ void Package :: setFilename( 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() ); } |