Changeset View
Changeset View
Standalone View
Standalone View
runners/appstream/appstreamrunner.cpp
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
50 | } | 50 | } | ||
51 | 51 | | |||
52 | static QIcon componentIcon(const AppStream::Component &comp) | 52 | static QIcon componentIcon(const AppStream::Component &comp) | ||
53 | { | 53 | { | ||
54 | QIcon ret; | 54 | QIcon ret; | ||
55 | const auto icons = comp.icons(); | 55 | const auto icons = comp.icons(); | ||
56 | if (icons.isEmpty()) { | 56 | if (icons.isEmpty()) { | ||
57 | ret = QIcon::fromTheme(QStringLiteral("package-x-generic")); | 57 | ret = QIcon::fromTheme(QStringLiteral("package-x-generic")); | ||
58 | } else foreach(const AppStream::Icon &icon, icons) { | 58 | } else for(const AppStream::Icon &icon : icons) { | ||
59 | QStringList stock; | 59 | QStringList stock; | ||
60 | switch(icon.kind()) { | 60 | switch(icon.kind()) { | ||
61 | case AppStream::Icon::KindLocal: | 61 | case AppStream::Icon::KindLocal: | ||
62 | ret.addFile(icon.url().toLocalFile(), icon.size()); | 62 | ret.addFile(icon.url().toLocalFile(), icon.size()); | ||
63 | break; | 63 | break; | ||
64 | case AppStream::Icon::KindCached: | 64 | case AppStream::Icon::KindCached: | ||
65 | ret.addFile(icon.url().toLocalFile(), icon.size()); | 65 | ret.addFile(icon.url().toLocalFile(), icon.size()); | ||
66 | break; | 66 | break; | ||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |