| 238 | } |
| 239 | |
| 240 | void ClientToolManager::gotTools(const QVector<GammaRay::ToolData> &tools) |
| 241 | { |
| 242 | emit aboutToReceiveData(); |
| 243 | for (const auto &tool : tools) { |
| 244 | ToolUiFactory *factory = s_pluginRepository()->factories.value(tool.id); |
| 245 | // hide tools we have no UI plugin for |
| 246 | if (tool.hasUi && factory) { |
| 247 | m_tools.append(ToolInfo(tool, factory)); |
| 248 | } |
| 249 | if (tool.enabled) { |
| 250 | if (factory && (factory->remotingSupported() || !Endpoint::instance()->isRemoteClient()) |
| 251 | && s_pluginRepository()->uninitializedTools.contains(factory)) { |
| 252 | factory->initUi(); |
| 253 | s_pluginRepository()->uninitializedTools.remove(factory); |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | std::sort(m_tools.begin(), m_tools.end(), toolLessThan); |
| 258 | emit toolListAvailable(); |
| 259 | |
| 260 | if (m_remote) { |
| 261 | disconnect(m_remote.data(), &ToolManagerInterface::availableToolsResponse, |
| 262 | this, &ClientToolManager::gotTools); |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | bool ClientToolManager::isToolListLoaded() const |
| 267 | { |
nothing calls this directly
no test coverage detected