| 328 | } |
| 329 | |
| 330 | void WorkingSetToolTipWidget::buttonClicked(bool) |
| 331 | { |
| 332 | QPointer<WorkingSetToolTipWidget> stillExists(this); |
| 333 | |
| 334 | auto* s = qobject_cast<QToolButton*>(sender()); |
| 335 | Q_ASSERT(s); |
| 336 | |
| 337 | auto* mainWindow = qobject_cast<MainWindow*>(Core::self()->uiController()->activeMainWindow()); |
| 338 | Q_ASSERT(mainWindow); |
| 339 | QSet<QString> openFiles = Core::self()->workingSetControllerInternal()->workingSet(mainWindow->area()->workingSet())->fileSet(); |
| 340 | |
| 341 | if (openFiles.remove(s->objectName())) { |
| 342 | filterViews(openFiles); |
| 343 | } else { |
| 344 | Core::self()->documentControllerInternal()->openDocument(QUrl::fromUserInput(s->objectName())); |
| 345 | } |
| 346 | |
| 347 | if(stillExists) |
| 348 | updateFileButtons(); |
| 349 | } |
| 350 | |
| 351 | void WorkingSetToolTipWidget::labelClicked() |
| 352 | { |
nothing calls this directly
no test coverage detected