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

Method cleanup

kdevplatform/shell/workingsetcontroller.cpp:78–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void WorkingSetController::cleanup()
79{
80 auto area = Core::self()->uiControllerInternal()->activeArea();
81 if (area && !area->workingSet().isEmpty()) {
82 Q_ASSERT(m_workingSets.contains(area->workingSet()));
83 m_workingSets[area->workingSet()]->saveFromArea(area);
84 }
85
86 const auto oldWorkingSet = m_workingSets;
87 for (WorkingSet* set : oldWorkingSet) {
88 qCDebug(WORKINGSET) << "set" << set->id() << "persistent" << set->isPersistent() << "has areas:" << set->hasConnectedAreas() << "files" << set->fileList();
89 if(!set->isPersistent() && !set->hasConnectedAreas()) {
90 qCDebug(WORKINGSET) << "deleting";
91 set->deleteSet(true, true);
92 }
93 delete set;
94 }
95
96 m_workingSets.clear();
97
98 delete m_emptyWorkingSet;
99 m_emptyWorkingSet = nullptr;
100}
101
102const QString WorkingSetController::makeSetId(const QString& prefix) const
103{

Callers

nothing calls this directly

Calls 12

activeAreaMethod · 0.80
uiControllerInternalMethod · 0.80
saveFromAreaMethod · 0.80
isPersistentMethod · 0.80
hasConnectedAreasMethod · 0.80
deleteSetMethod · 0.80
isEmptyMethod · 0.45
workingSetMethod · 0.45
containsMethod · 0.45
idMethod · 0.45
fileListMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected