summaryrefslogtreecommitdiff
authordrw <drw>2003-03-27 02:13:19 (UTC)
committer drw <drw>2003-03-27 02:13:19 (UTC)
commit72673ba6769cef021f23002cb0a8e1545ee43632 (patch) (unidiff)
treece11217c6ad7c55c0b9f2a443bd49586636b8640
parent0fc0190f424cf7e05f82a5c506db74c1e7f98e3b (diff)
downloadopie-72673ba6769cef021f23002cb0a8e1545ee43632.zip
opie-72673ba6769cef021f23002cb0a8e1545ee43632.tar.gz
opie-72673ba6769cef021f23002cb0a8e1545ee43632.tar.bz2
Fix bug #780 - correctly identify whether a package is really installed or not
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/package.cpp2
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
@@ -51,49 +51,49 @@ Package::Package( char *name )
51 installed = false; 51 installed = false;
52 installedTo = 0; 52 installedTo = 0;
53} 53}
54 54
55Package::~Package() 55Package::~Package()
56{ 56{
57} 57}
58 58
59QString Package :: toString() 59QString Package :: toString()
60{ 60{
61 QString ret = "Package - " + getPackageName() + 61 QString ret = "Package - " + getPackageName() +
62 "\n version - " + getVersion(); 62 "\n version - " + getVersion();
63 63
64 if ( localPackage ) 64 if ( localPackage )
65 ret += "\n inst version - " + localPackage->getVersion(); 65 ret += "\n inst version - " + localPackage->getVersion();
66 66
67 67
68 return ret; 68 return ret;
69} 69}
70 70
71void Package :: setStatus( const QString &s ) 71void Package :: setStatus( const QString &s )
72{ 72{
73 status = s; 73 status = s;
74 74
75 if ( status.find( "installed" ) != -1 ) 75 if ( status.find( "ok installed" ) != -1 )
76 installed = true; 76 installed = true;
77} 77}
78 78
79void Package :: setLocalPackage( Package *p ) 79void Package :: setLocalPackage( Package *p )
80{ 80{
81 localPackage = p; 81 localPackage = p;
82 82
83 if ( localPackage ) 83 if ( localPackage )
84 if ( localPackage->getVersion() != getVersion() ) 84 if ( localPackage->getVersion() != getVersion() )
85 differentVersionAvailable = true; 85 differentVersionAvailable = true;
86 else 86 else
87 differentVersionAvailable = false; 87 differentVersionAvailable = false;
88} 88}
89 89
90void Package :: setVersion( const QString &v ) 90void Package :: setVersion( const QString &v )
91{ 91{
92 version = v; 92 version = v;
93 93
94 if ( localPackage ) 94 if ( localPackage )
95 if ( localPackage->getVersion() != getVersion() ) 95 if ( localPackage->getVersion() != getVersion() )
96 differentVersionAvailable = true; 96 differentVersionAvailable = true;
97 else 97 else
98 differentVersionAvailable = false; 98 differentVersionAvailable = false;
99} 99}