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

Function getDWidget

src/plugins/core/uicontroller/controller.cpp:74–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 std::function<AbstractWidget *()> createDWidgetFunc;
73
74 DWidget *getDWidget()
75 {
76 if (!widget) {
77 if (createDWidgetFunc) {
78 auto abstractWidget = createDWidgetFunc();
79 icon = abstractWidget->getDisplayIcon();
80 widget = static_cast<DWidget *>(abstractWidget->qWidget());
81 Q_ASSERT(widget);
82 if (!widget->parent())
83 widget->setParent(Controller::instance()->mainWindow());
84 }
85 }
86 return widget;
87 }
88
89 void setWidget(DWidget *widget)
90 {

Callers

nothing calls this directly

Calls 4

getDisplayIconMethod · 0.80
qWidgetMethod · 0.80
parentMethod · 0.45
mainWindowMethod · 0.45

Tested by

no test coverage detected