| 106 | } |
| 107 | |
| 108 | PluginMetaObjectPointer PluginListView::currentPlugin() const |
| 109 | { |
| 110 | QStandardItem *item = model->itemFromIndex(currentIndex()); |
| 111 | if (item) { |
| 112 | QString pluginName = item->data(Qt::DisplayRole).toString(); |
| 113 | QString category = item->data(PluginListView::Category).toString(); |
| 114 | const QHash<QString, QQueue<PluginMetaObjectPointer>> &pluginCollections = |
| 115 | LifeCycle::getPluginManagerInstance()->pluginCollections(); |
| 116 | auto &metaObjects = pluginCollections.value(category); |
| 117 | for (auto metaObject : metaObjects) { |
| 118 | if (metaObject->name() == pluginName) |
| 119 | return metaObject; |
| 120 | } |
| 121 | } |
| 122 | return {}; |
| 123 | } |
| 124 | |
| 125 | void PluginListView::filter(const QString &filterText) |
| 126 | { |
no test coverage detected