Diffstat (limited to 'noncore/settings/aqpkg/package.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/package.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp index 4c27c65..adda832 100644 --- a/noncore/settings/aqpkg/package.cpp +++ b/noncore/settings/aqpkg/package.cpp @@ -1,5 +1,5 @@ /* This file is part of the OPIE Project - + =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> .=l. Dan Williams <drw@handhelds.org> @@ -31,13 +31,16 @@ #include "global.h" +#include <qobject.h> + Package::Package( QString &name ) { packageName = name; - version = "N/A"; - description = "N/A"; - packageSize = "N/A"; - section = "N/A"; - + QString tempstr = QObject::tr( "N/A" ); + version = tempstr; + description = tempstr; + packageSize = tempstr; + section = tempstr; + localPackage = 0; installed = false; @@ -52,9 +55,10 @@ Package::Package( char *name ) packageName = name; - version = "N/A"; - description = "N/A"; - packageSize = "N/A"; - section = "N/A"; - + QString tempstr = QObject::tr( "N/A" ); + version = tempstr; + description = tempstr; + packageSize = tempstr; + section = tempstr; + localPackage = 0; installed = false; @@ -72,9 +76,10 @@ Package::~Package() QString Package :: toString() { - QString ret = "Package - " + getPackageName() + - "\n version - " + getVersion(); + QString ret = QObject::tr( "Package - %1\n version - %2" ). + arg( getPackageName() ). + arg( getVersion() ); if ( localPackage ) - ret += "\n inst version - " + localPackage->getVersion(); + ret.append( QObject::tr( "\n inst version - %1" ).arg( localPackage->getVersion() ) ); @@ -88,5 +93,5 @@ void Package :: setStatus( const QString &s ) status = s.simplifyWhiteSpace( ); - + two = status.find( " " ); // find second column three = status.find( " ", two + 1 ); // find third column |