  
  void ChartsWidget::removeAll() {
    if (!charts.isEmpty()) {
      for (auto c : charts) {
        c->deleteLater();
      }
      charts.clear();
      updateToolBar();
 
</s> remove   for (int i = 0; i < tabbar->count(); ++i) {
    tabbar->setTabText(i, QString("Tab %1").arg(i + 1));
  }
 </s> add 
  while (tabbar->count() > 1) {
    tabbar->removeTab(1);
  }
  tab_charts.clear();

  
  void ChartsWidget::removeAll() {
  while (tabbar->count() > 1) {
    tabbar->removeTab(1);
  }
  tab_charts.clear();

    if (!charts.isEmpty()) {
      for (auto c : charts) {
        c->deleteLater();
      }
      charts.clear();
      updateToolBar();
keep add keep keep keep keep keep keep
 cabana: display chart count in tab (#27853)

display chart count in tabbar 
tools/cabana/chart/chartswidget.cc