MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / start

Method start

src/plugins/codeporting/codeportingplugin.cpp:24–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24bool CodePortingPlugin::start()
25{
26 auto &ctx = dpfInstance.serviceContext();
27 windowService = ctx.service<WindowService>(WindowService::name());
28 if (!windowService) {
29 qCritical() << "Failed, can't found window service";
30 abort();
31 }
32
33 // Add code porting item in tool menu.
34 auto mTools = ActionManager::instance()->actionContainer(M_TOOLS);
35
36 QAction *action = new QAction(tr("Code Porting"), mTools);
37 auto cmd = ActionManager::instance()->registerAction(action, A_CODE_PORTING);
38 mTools->addAction(cmd);
39 connect(action, &QAction::triggered, CodePortingManager::instance(), &CodePortingManager::slotShowConfigWidget);
40
41 return true;
42}
43
44dpf::Plugin::ShutdownFlag CodePortingPlugin::stop()
45{

Callers

nothing calls this directly

Calls 6

abortFunction · 0.85
connectFunction · 0.85
actionContainerMethod · 0.80
registerActionMethod · 0.80
nameFunction · 0.50
addActionMethod · 0.45

Tested by

no test coverage detected