summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/package.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp
index 99187ac..83e0706 100644
--- a/noncore/settings/aqpkg/package.cpp
+++ b/noncore/settings/aqpkg/package.cpp
@@ -67,15 +67,23 @@ QString Package :: toString()
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 QString state_status;
74 int two, three;
74 75
75 if ( status.find( "ok installed" ) != -1 ) 76 status = s.simplifyWhiteSpace( );
77
78 two = status.find( " " ); // find second column
79 three = status.find( " ", two + 1 ); // find third column
80
81 state_status = status.mid( three ).stripWhiteSpace( );
82
83 if ( state_status == "installed" )
76 installed = true; 84 installed = true;
77} 85}
78 86
79void Package :: setLocalPackage( Package *p ) 87void Package :: setLocalPackage( Package *p )
80{ 88{
81 localPackage = p; 89 localPackage = p;