MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / currentPlugin

Method currentPlugin

src/plugins/core/gui/pluginlistview.cpp:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108PluginMetaObjectPointer 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
125void PluginListView::filter(const QString &filterText)
126{

Callers 1

Calls 4

toStringMethod · 0.45
dataMethod · 0.45
valueMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected