summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (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
@@ -72,5 +72,13 @@ void Package :: setStatus( const QString &s )
{
- status = s;
+ QString state_status;
+ int two, three;
- if ( status.find( "ok installed" ) != -1 )
+ status = s.simplifyWhiteSpace( );
+
+ two = status.find( " " ); // find second column
+ three = status.find( " ", two + 1 ); // find third column
+
+ state_status = status.mid( three ).stripWhiteSpace( );
+
+ if ( state_status == "installed" )
installed = true;