Changeset View
Changeset View
Standalone View
Standalone View
src/plugin/kplugintrader.h
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | 90 | public: | |||
---|---|---|---|---|---|
225 | { | 225 | { | ||
226 | Q_UNUSED(parentWidget) | 226 | Q_UNUSED(parentWidget) | ||
227 | Q_UNUSED(args) | 227 | Q_UNUSED(args) | ||
228 | if (error) { | 228 | if (error) { | ||
229 | error->clear(); | 229 | error->clear(); | ||
230 | } | 230 | } | ||
231 | const KPluginInfo::List offers = self()->query(subDirectory, serviceType, constraint); | 231 | const KPluginInfo::List offers = self()->query(subDirectory, serviceType, constraint); | ||
232 | 232 | | |||
233 | Q_FOREACH (const KPluginInfo &info, offers) { | 233 | for (const KPluginInfo &info : offers) { | ||
234 | KPluginLoader loader(info.libraryPath()); | 234 | KPluginLoader loader(info.libraryPath()); | ||
235 | const QVariantList argsWithMetaData = QVariantList() << loader.metaData().toVariantMap(); | 235 | const QVariantList argsWithMetaData = QVariantList() << loader.metaData().toVariantMap(); | ||
236 | KPluginFactory *factory = loader.factory(); | 236 | KPluginFactory *factory = loader.factory(); | ||
237 | if (factory) { | 237 | if (factory) { | ||
238 | T *component = factory->create<T>(parent, argsWithMetaData); | 238 | T *component = factory->create<T>(parent, argsWithMetaData); | ||
239 | if (component) { | 239 | if (component) { | ||
240 | return component; | 240 | return component; | ||
241 | } | 241 | } | ||
Show All 27 Lines |