MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / onTabClosed

Method onTabClosed

src/plugins/codeeditor/gui/tabwidget.cpp:370–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void TabWidgetPrivate::onTabClosed(const QString &fileName)
371{
372 auto editor = findEditor(fileName);
373 if (!editor)
374 return;
375
376 Inotify::globalInstance()->removePath(fileName);
377 removePositionRecord(fileName);
378 editorMng.remove(fileName);
379 recentOpenedFiles.removeOne(fileName);
380 editorLayout->removeWidget(editor);
381 if (!recentOpenedFiles.isEmpty())
382 q->openFile(recentOpenedFiles.first());
383 changeFocusProxy();
384
385 emit editor->fileClosed(fileName);
386 editor->deleteLater();
387
388 if (editorMng.isEmpty()) {
389 symbolBar->clear();
390 symbolBar->setVisible(false);
391 q->setSplitButtonVisible(false);
392 emit q->closeRequested();
393 }
394}
395
396void TabWidgetPrivate::onSpliterClicked(Qt::Orientation ori)
397{

Callers

nothing calls this directly

Calls 8

removeWidgetMethod · 0.80
setVisibleMethod · 0.80
removePathMethod · 0.45
removeMethod · 0.45
isEmptyMethod · 0.45
openFileMethod · 0.45
clearMethod · 0.45
setSplitButtonVisibleMethod · 0.45

Tested by

no test coverage detected