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

Method start

src/plugins/recent/recent.cpp:23–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23bool Recent::start()
24{
25 qInfo() << __FUNCTION__;
26 auto &ctx = dpfInstance.serviceContext();
27 WindowService *windowService = ctx.service<WindowService>(WindowService::name());
28
29 if (windowService) {
30 QObject::connect(RecentProxy::instance(), &RecentProxy::saveOpenedProject,
31 RecentDisplayWidget::instance(), &RecentDisplayWidget::addProject);
32 QObject::connect(RecentProxy::instance(), &RecentProxy::saveOpenedFile,
33 RecentDisplayWidget::instance(), &RecentDisplayWidget::addDocument);
34
35 QAction *action = new QAction(MWNA_RECENT, this);
36 action->setIcon(QIcon::fromTheme("recent-navigation"));
37 windowService->addNavigationItem(new AbstractAction(action), Priority::highest);
38
39 auto recentWidgetImpl = new AbstractWidget(RecentDisplayWidget::instance());
40 windowService->registerWidgetToMode("recentWindow", recentWidgetImpl, CM_RECENT, Position::FullWindow, true, true);
41 }
42 return true;
43}
44
45dpf::Plugin::ShutdownFlag Recent::stop()
46{

Callers 2

initConnectionMethod · 0.45
setExpandMethod · 0.45

Calls 5

connectFunction · 0.85
addNavigationItemMethod · 0.80
registerWidgetToModeMethod · 0.80
nameFunction · 0.50
setIconMethod · 0.45

Tested by

no test coverage detected