Diffstat (limited to 'noncore/unsupported/oipkg/packagelistitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelistitem.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp index 2f81714..45aaf1d 100644 --- a/noncore/unsupported/oipkg/packagelistitem.cpp +++ b/noncore/unsupported/oipkg/packagelistitem.cpp | |||
@@ -29,12 +29,13 @@ void PackageListItem::init( Package *pi, PackageManagerSettings *s) | |||
29 | setExpandable( true ); | 29 | setExpandable( true ); |
30 | QCheckListItem *item; | 30 | QCheckListItem *item; |
31 | nameItem = new QCheckListItem( this, "" ); | 31 | nameItem = new QCheckListItem( this, "" ); |
32 | item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() ); | 32 | item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() ); |
33 | destItem = new QCheckListItem( this, "" ); | 33 | destItem = new QCheckListItem( this, "" ); |
34 | linkItem = new QCheckListItem( this, "" ); | 34 | linkItem = new QCheckListItem( this, "" ); |
35 | statusItem = new QCheckListItem( this, "" ); | ||
35 | QCheckListItem *otherItem = new QCheckListItem( this, QObject::tr("other") ); | 36 | QCheckListItem *otherItem = new QCheckListItem( this, QObject::tr("other") ); |
36 | item = new QCheckListItem( otherItem, QObject::tr("Description: ")+pi->desc() ); | 37 | item = new QCheckListItem( otherItem, QObject::tr("Description: ")+pi->desc() ); |
37 | QDict<QString> *fields = pi->getFields(); | 38 | QDict<QString> *fields = pi->getFields(); |
38 | QDictIterator<QString> it( *fields ); | 39 | QDictIterator<QString> it( *fields ); |
39 | while ( it.current() ) { | 40 | while ( it.current() ) { |
40 | item = new QCheckListItem( otherItem, QString(it.currentKey()+": "+*it.current()) ); | 41 | item = new QCheckListItem( otherItem, QString(it.currentKey()+": "+*it.current()) ); |
@@ -126,15 +127,18 @@ void PackageListItem::setOn( bool b ) | |||
126 | package->setLink( settings->createLinks() ); | 127 | package->setLink( settings->createLinks() ); |
127 | displayDetails(); | 128 | displayDetails(); |
128 | } | 129 | } |
129 | 130 | ||
130 | void PackageListItem::displayDetails() | 131 | void PackageListItem::displayDetails() |
131 | { | 132 | { |
132 | QString sod = " ("+package->sizeUnits(); | 133 | QString sod; |
134 | sod += package->sizeUnits().isEmpty()?QString(""):QString(package->sizeUnits()); | ||
135 | //sod += QString(package->dest().isEmpty()?"":QObject::tr(" on ")+package->dest()); | ||
133 | sod += package->dest().isEmpty()?QString(""):QString(QObject::tr(" on ")+package->dest()); | 136 | sod += package->dest().isEmpty()?QString(""):QString(QObject::tr(" on ")+package->dest()); |
134 | sod += ")"; | 137 | sod = sod.isEmpty()?QString(""):QString(" ("+sod+")"); |
135 | setText(0, package->name()+sod ); | 138 | setText(0, package->name()+sod ); |
136 | nameItem->setText( 0, QObject::tr("Name: ")+package->name()); | 139 | nameItem->setText( 0, QObject::tr("Name: ")+package->name()); |
137 | linkItem->setText( 0, QObject::tr("Link: ")+QString(package->link()?QObject::tr("Yes"):QObject::tr("No")) ); | 140 | linkItem->setText( 0, QObject::tr("Link: ")+QString(package->link()?QObject::tr("Yes"):QObject::tr("No")) ); |
138 | destItem->setText( 0, QObject::tr("Destination: ")+package->dest() ); | 141 | destItem->setText( 0, QObject::tr("Destination: ")+package->dest() ); |
142 | statusItem->setText( 0, QObject::tr("Status: ")+package->status() ); | ||
139 | repaint(); | 143 | repaint(); |
140 | } | 144 | } |