| 50 | } |
| 51 | |
| 52 | void ClosedWorkingSetsWidget::areaChanged( Sublime::Area* area ) |
| 53 | { |
| 54 | if (m_connectedArea) { |
| 55 | disconnect(m_connectedArea, &Sublime::Area::changedWorkingSet, |
| 56 | this, &ClosedWorkingSetsWidget::changedWorkingSet); |
| 57 | } |
| 58 | |
| 59 | m_connectedArea = area; |
| 60 | connect(m_connectedArea, &Sublime::Area::changedWorkingSet, |
| 61 | this, &ClosedWorkingSetsWidget::changedWorkingSet); |
| 62 | |
| 63 | // clear layout |
| 64 | qDeleteAll(m_buttons); |
| 65 | m_buttons.clear(); |
| 66 | |
| 67 | // add sets from new area |
| 68 | const auto allWorkingSets = Core::self()->workingSetControllerInternal()->allWorkingSets(); |
| 69 | for (WorkingSet* set : allWorkingSets) { |
| 70 | if (!set->hasConnectedArea(area) && set->isPersistent()) { |
| 71 | addWorkingSet(set); |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | void ClosedWorkingSetsWidget::changedWorkingSet(Sublime::Area *area, Sublime::Area*, const QString &from, const QString &to) |
| 77 | { |
nothing calls this directly
no test coverage detected