Changeset View
Changeset View
Standalone View
Standalone View
tests/khotnewstuff_test.cpp
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Line(s) | |||||
162 | 162 | | |||
163 | void KNewStuff2Test::slotEntriesLoaded(const KNSCore::EntryInternal::List &entries) | 163 | void KNewStuff2Test::slotEntriesLoaded(const KNSCore::EntryInternal::List &entries) | ||
164 | { | 164 | { | ||
165 | addMessage(QString::fromUtf8("SLOT: slotEntriesLoaded. Number of entries %1").arg(entries.count()), QStringLiteral("msg_info")); | 165 | addMessage(QString::fromUtf8("SLOT: slotEntriesLoaded. Number of entries %1").arg(entries.count()), QStringLiteral("msg_info")); | ||
166 | 166 | | |||
167 | if (m_testall) { | 167 | if (m_testall) { | ||
168 | addMessage(QString::fromUtf8("-- now, download the entries' previews and payload files"), QStringLiteral("msg_info")); | 168 | addMessage(QString::fromUtf8("-- now, download the entries' previews and payload files"), QStringLiteral("msg_info")); | ||
169 | 169 | | |||
170 | Q_FOREACH(const KNSCore::EntryInternal &entry, entries) { | 170 | for (const KNSCore::EntryInternal &entry : entries) { | ||
171 | addMessage(QString::fromUtf8("-- entry: %1").arg(entry.name()), QStringLiteral("msg_info")); | 171 | addMessage(QString::fromUtf8("-- entry: %1").arg(entry.name()), QStringLiteral("msg_info")); | ||
172 | if (!entry.previewUrl(KNSCore::EntryInternal::PreviewSmall1).isEmpty()) { | 172 | if (!entry.previewUrl(KNSCore::EntryInternal::PreviewSmall1).isEmpty()) { | ||
173 | m_engine->loadPreview(entry, KNSCore::EntryInternal::PreviewSmall1); | 173 | m_engine->loadPreview(entry, KNSCore::EntryInternal::PreviewSmall1); | ||
174 | } | 174 | } | ||
175 | if (!entry.payload().isEmpty()) { | 175 | if (!entry.payload().isEmpty()) { | ||
176 | m_engine->install(entry); | 176 | m_engine->install(entry); | ||
177 | } | 177 | } | ||
178 | } | 178 | } | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |