Changeset View
Changeset View
Standalone View
Standalone View
keditfiletype/kservicelistwidget.cpp
Show All 40 Lines | |||||
41 | KServiceListItem::KServiceListItem( const KService::Ptr& pService, int kind ) | 41 | KServiceListItem::KServiceListItem( const KService::Ptr& pService, int kind ) | ||
42 | : QListWidgetItem(), storageId(pService->storageId()), desktopPath(pService->entryPath()) | 42 | : QListWidgetItem(), storageId(pService->storageId()), desktopPath(pService->entryPath()) | ||
43 | { | 43 | { | ||
44 | if ( kind == KServiceListWidget::SERVICELIST_APPLICATIONS ) | 44 | if ( kind == KServiceListWidget::SERVICELIST_APPLICATIONS ) | ||
45 | setText( pService->name() ); | 45 | setText( pService->name() ); | ||
46 | else | 46 | else | ||
47 | setText( i18n( "%1 (%2)", pService->name(), pService->desktopEntryName() ) ); | 47 | setText( i18n( "%1 (%2)", pService->name(), pService->desktopEntryName() ) ); | ||
48 | 48 | | |||
49 | setIcon( QIcon::fromTheme( pService->icon() ) ); | ||||
50 | | ||||
49 | if (!pService->isApplication()) | 51 | if (!pService->isApplication()) | ||
50 | localPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kservices5/") + desktopPath; | 52 | localPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kservices5/") + desktopPath; | ||
51 | else | 53 | else | ||
52 | localPath = pService->locateLocal(); | 54 | localPath = pService->locateLocal(); | ||
53 | } | 55 | } | ||
54 | 56 | | |||
55 | 57 | | |||
56 | 58 | | |||
▲ Show 20 Lines • Show All 359 Lines • Show Last 20 Lines |