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

Method activateView

kdevplatform/sublime/mainwindow.cpp:233–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233void MainWindow::activateView(Sublime::View* view, bool focus)
234{
235 Q_D(MainWindow);
236
237 const auto containerIt = d->viewContainers.constFind(view);
238 if (containerIt == d->viewContainers.constEnd())
239 return;
240
241 if (d->activeView == view)
242 {
243 optionallyFocusViewWidget(view, focus);
244 return;
245 }
246
247 auto* const widget = view->widget();
248 Q_ASSERT(widget);
249 (*containerIt)->setCurrentWidget(widget);
250
251 setActiveView(view, focus);
252 d->area->setActiveView(view);
253}
254
255void MainWindow::setActiveView(View *view, bool focus)
256{

Callers 8

setActiveViewMethod · 0.45
testDisableBuddiesMethod · 0.45
testDisableAllMethod · 0.45
testSplitViewBuddiesMethod · 0.45

Calls 6

constEndMethod · 0.80
constFindMethod · 0.45
widgetMethod · 0.45
setCurrentWidgetMethod · 0.45
setActiveViewMethod · 0.45

Tested by 6

testDisableBuddiesMethod · 0.36
testDisableAllMethod · 0.36
testSplitViewBuddiesMethod · 0.36