MCPcopy Create free account
hub / github.com/KDAB/GammaRay / gotTools

Method gotTools

ui/clienttoolmanager.cpp:240–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240void 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
266bool ClientToolManager::isToolListLoaded() const
267{

Callers

nothing calls this directly

Calls 9

appendMethod · 0.80
endMethod · 0.80
valueMethod · 0.45
remotingSupportedMethod · 0.45
isRemoteClientMethod · 0.45
initUiMethod · 0.45
removeMethod · 0.45
beginMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected