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

Function optionallyFocusViewWidget

kdevplatform/sublime/mainwindow.cpp:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void optionallyFocusViewWidget(const Sublime::View* view, bool focus)
50{
51 if (!focus || !view) {
52 return; // nothing to do
53 }
54 auto* const widget = view->widget();
55 if (!widget->hasFocus()) {
56 widget->setFocus();
57 }
58}
59
60} // unnamed namespace
61

Callers 2

activateViewMethod · 0.85
setActiveViewMethod · 0.85

Calls 1

widgetMethod · 0.45

Tested by

no test coverage detected