summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/package.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/package.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/package.cpp35
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,6 +1,6 @@
1/* 1/*
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
5             .=l. Dan Williams <drw@handhelds.org> 5             .=l. Dan Williams <drw@handhelds.org>
6           .>+-= 6           .>+-=
@@ -30,15 +30,18 @@
30#include "package.h" 30#include "package.h"
31#include "global.h" 31#include "global.h"
32 32
33#include <qobject.h>
34
33Package::Package( QString &name ) 35Package::Package( QString &name )
34{ 36{
35 packageName = name; 37 packageName = name;
36 38
37 version = "N/A"; 39 QString tempstr = QObject::tr( "N/A" );
38 description = "N/A"; 40 version = tempstr;
39 packageSize = "N/A"; 41 description = tempstr;
40 section = "N/A"; 42 packageSize = tempstr;
41 43 section = tempstr;
44
42 localPackage = 0; 45 localPackage = 0;
43 installed = false; 46 installed = false;
44 packageStoredLocally = false; 47 packageStoredLocally = false;
@@ -51,11 +54,12 @@ Package::Package( char *name )
51{ 54{
52 packageName = name; 55 packageName = name;
53 56
54 version = "N/A"; 57 QString tempstr = QObject::tr( "N/A" );
55 description = "N/A"; 58 version = tempstr;
56 packageSize = "N/A"; 59 description = tempstr;
57 section = "N/A"; 60 packageSize = tempstr;
58 61 section = tempstr;
62
59 localPackage = 0; 63 localPackage = 0;
60 installed = false; 64 installed = false;
61 packageStoredLocally = false; 65 packageStoredLocally = false;
@@ -71,11 +75,12 @@ Package::~Package()
71 75
72QString Package :: toString() 76QString Package :: toString()
73{ 77{
74 QString ret = "Package - " + getPackageName() + 78 QString ret = QObject::tr( "Package - %1\n version - %2" ).
75 "\n version - " + getVersion(); 79 arg( getPackageName() ).
80 arg( getVersion() );
76 81
77 if ( localPackage ) 82 if ( localPackage )
78 ret += "\n inst version - " + localPackage->getVersion(); 83 ret.append( QObject::tr( "\n inst version - %1" ).arg( localPackage->getVersion() ) );
79 84
80 85
81 return ret; 86 return ret;
@@ -87,7 +92,7 @@ void Package :: setStatus( const QString &s )
87 int two, three; 92 int two, three;
88 93
89 status = s.simplifyWhiteSpace( ); 94 status = s.simplifyWhiteSpace( );
90 95
91 two = status.find( " " ); // find second column 96 two = status.find( " " ); // find second column
92 three = status.find( " ", two + 1 ); // find third column 97 three = status.find( " ", two + 1 ); // find third column
93 98