| 349 | } |
| 350 | |
| 351 | void WorkingSetToolTipWidget::labelClicked() |
| 352 | { |
| 353 | QPointer<WorkingSetToolTipWidget> stillExists(this); |
| 354 | |
| 355 | auto* s = qobject_cast<WorkingSetFileLabel*>(sender()); |
| 356 | Q_ASSERT(s); |
| 357 | |
| 358 | bool found = false; |
| 359 | |
| 360 | auto* window = static_cast<Sublime::MainWindow*>(ICore::self()->uiController()->activeMainWindow()); |
| 361 | |
| 362 | const auto views = window->area()->views(); |
| 363 | for (Sublime::View* view : views) { |
| 364 | if(view->document()->documentSpecifier() == s->objectName()) |
| 365 | { |
| 366 | window->activateView(view); |
| 367 | found = true; |
| 368 | break; |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | if(!found) |
| 373 | Core::self()->documentControllerInternal()->openDocument(QUrl::fromUserInput(s->objectName())); |
| 374 | |
| 375 | if(stillExists) |
| 376 | updateFileButtons(); |
| 377 | } |
| 378 | |
| 379 | #include "workingsettooltipwidget.moc" |
| 380 | #include "moc_workingsettooltipwidget.cpp" |
nothing calls this directly
no test coverage detected