docs: def _on_changed(self):
          """
          Update the tree items
          """
          self._updating = True
          to_collapse = []
          self.clear()
          if self._editor and self._outline_mode and self._folding_panel:
              items, to_collapse = self.to_tree_widget_items(
                  self._outline_mode.definitions, to_collapse=to_collapse)
              if len(items):
                  self.addTopLevelItems(items)
                  self.expandAll()
                  for item in reversed(to_collapse):
                      self.collapseItem(item)
                  self._updating = False
                  return
  
          # no data
          root = QtWidgets.QTreeWidgetItem()
          root.setText(0, _('No data'))
          root.setIcon(0, icons.icon(
              'dialog-information', ':/pyqode-icons/rc/dialog-info.png',
              'fa.info-circle'))
          self.addTopLevelItem(root)
          self._updating = False
          self.sync()