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

Function filterViews

kdevplatform/shell/workingsets/workingsethelpers.cpp:27–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void filterViews(const QSet< QString >& keepFiles)
28{
29 MainWindow* window = mainWindow();
30
31 const auto views = window->area()->views();
32 for (Sublime::View* view : views) {
33
34 auto* partDoc = qobject_cast<PartDocument*>(view->document());
35 if(partDoc && !keepFiles.contains(partDoc->documentSpecifier())) {
36 if(view->document()->views().count() == 1) {
37 partDoc->close();
38 continue;
39 }
40
41 window->area()->closeView(view);
42 }
43 }
44}
45
46}

Callers 3

intersectSetMethod · 0.85
subtractSetMethod · 0.85
buttonClickedMethod · 0.85

Calls 9

mainWindowFunction · 0.85
viewsMethod · 0.45
areaMethod · 0.45
documentMethod · 0.45
containsMethod · 0.45
documentSpecifierMethod · 0.45
countMethod · 0.45
closeMethod · 0.45
closeViewMethod · 0.45

Tested by

no test coverage detected