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

Method buttonClicked

kdevplatform/shell/workingsets/workingsettooltipwidget.cpp:330–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330void 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
351void WorkingSetToolTipWidget::labelClicked()
352{

Callers

nothing calls this directly

Calls 10

filterViewsFunction · 0.85
uiControllerMethod · 0.80
activeMainWindowMethod · 0.45
fileSetMethod · 0.45
workingSetMethod · 0.45
areaMethod · 0.45
removeMethod · 0.45
openDocumentMethod · 0.45

Tested by

no test coverage detected