| 480 | } |
| 481 | |
| 482 | void 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 | |
| 508 | void WorkingSet::areaViewAdded(Sublime::AreaIndex*, Sublime::View*) { |
| 509 | auto* area = qobject_cast<Sublime::Area*>(sender()); |
no test coverage detected