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

Method saveFromArea

kdevplatform/shell/workingsets/workingset.cpp:482–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482void WorkingSet::saveFromArea(Sublime::Area* area)
483{
484 qCDebug(WORKINGSET) << "saving" << m_id << "from area";
485
486 bool wasPersistent = isPersistent();
487
488 KConfigGroup setConfig(Core::self()->activeSession()->config(), QStringLiteral("Working File Sets"));
489
490 KConfigGroup setGroup = setConfig.group(m_id);
491 setGroup.deleteGroup();
492
493 saveFromAreaPrivate(area->rootIndex(), setGroup, area->activeView());
494
495 if (isEmpty()) {
496 setGroup.deleteGroup();
497 } else {
498 setPersistent(wasPersistent);
499 }
500
501#ifdef SYNC_OFTEN
502 setConfig.sync();
503#endif
504
505 emit setChangedSignificantly();
506}
507
508void WorkingSet::areaViewAdded(Sublime::AreaIndex*, Sublime::View*) {
509 auto* area = qobject_cast<Sublime::Area*>(sender());

Callers 7

saveAreaMethod · 0.80
cleanupMethod · 0.80
saveAreaMethod · 0.80
changingWorkingSetMethod · 0.80
viewAddedMethod · 0.80
duplicateSetMethod · 0.80
closeSetMethod · 0.80

Calls 6

saveFromAreaPrivateFunction · 0.85
rootIndexMethod · 0.80
isEmptyFunction · 0.50
configMethod · 0.45
activeSessionMethod · 0.45
activeViewMethod · 0.45

Tested by

no test coverage detected