MCPcopy Create free account
hub / github.com/KDE/kdevelop / addPlugin

Method addPlugin

kdevplatform/shell/mainwindow_p.cpp:80–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void MainWindowPrivate::addPlugin( IPlugin *plugin )
81{
82 qCDebug(SHELL) << "add plugin" << plugin << plugin->componentName();
83 Q_ASSERT( plugin );
84
85 //The direct plugin client can only be added to the first mainwindow
86 if(m_mainWindow == Core::self()->uiControllerInternal()->mainWindows()[0])
87 m_mainWindow->guiFactory()->addClient( plugin );
88
89 Q_ASSERT(!m_pluginCustomClients.contains(plugin));
90
91 KXMLGUIClient* ownClient = plugin->createGUIForMainWindow(m_mainWindow);
92 if(ownClient) {
93 m_pluginCustomClients[plugin] = ownClient;
94 connect(plugin, &IPlugin::destroyed, this, &MainWindowPrivate::pluginDestroyed);
95 m_mainWindow->guiFactory()->addClient(ownClient);
96 }
97}
98
99void MainWindowPrivate::pluginDestroyed(QObject* pluginObj)
100{

Callers 1

initializeMethod · 0.80

Calls 6

componentNameMethod · 0.80
mainWindowsMethod · 0.80
uiControllerInternalMethod · 0.80
guiFactoryMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected