| 84 | } |
| 85 | |
| 86 | void 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 | |
| 115 | void DeviceImpl::unloadPlugins() |
| 116 | { |
no test coverage detected