MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / loadPlugins

Method loadPlugins

core/src/deviceimpl.cpp:86–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void DeviceImpl::loadPlugins()
87{
88 DebugTimer benchmark;
89 removeDisabledPlugins();
90 preload();
91 loadName();
92 loadIcons();
93 loadBadges();
94 loadPages();
95 loadConfigPage();
96 loadToolList();
97 if(m_plugins.isEmpty()) {
98 connbtn->hide();
99 }
100 for(auto &p : m_plugins) {
101 connect(dynamic_cast<QObject *>(p), SIGNAL(connectDevice()), this, SLOT(connectDev()));
102 connect(dynamic_cast<QObject *>(p), SIGNAL(disconnectDevice()), this, SLOT(disconnectDev()));
103 connect(dynamic_cast<QObject *>(p), SIGNAL(toolListChanged()), this, SIGNAL(toolListChanged()));
104 connect(dynamic_cast<QObject *>(p), SIGNAL(restartDevice()), this, SIGNAL(requestedRestart()));
105 connect(dynamic_cast<QObject *>(p), SIGNAL(requestToolByUuid(QString)), this,
106 SIGNAL(requestTool(QString)));
107 connect(dynamic_cast<QObject *>(p), SIGNAL(connectionLost()), this, SLOT(onConnectionLost()));
108 p->postload();
109 p->setDevice(this);
110 }
111 m_state = DEV_IDLE;
112 DEBUGTIMER_LOG(benchmark, this->displayName() + " plugins load took:");
113}
114
115void DeviceImpl::unloadPlugins()
116{

Callers 1

addDeviceMethod · 0.80

Calls 4

displayNameMethod · 0.95
connectFunction · 0.50
postloadMethod · 0.45
setDeviceMethod · 0.45

Tested by

no test coverage detected