-rw-r--r-- | noncore/settings/aqpkg/package.cpp | 12 |
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 @@ -71,7 +71,15 @@ QString Package :: toString() 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; } |