docs: def __addTab(self, filePath):
          """Returns existing tab index. Creates a new one if it isn't opened and returns its index
          otherwise."""
          for i in range(self.tabBar.count()):
              widget = self.pages.widget(i)
              if not widget.isStatic and filePath == widget.filePath:
                  return i
          tab = SubtitleEditor(filePath, self._subtitleData, self)
          newIndex = self.tabBar.addTab(self._createTabName(tab.name, tab.history.isClean()))
          tab.history.cleanChanged.connect(
              lambda clean: self._cleanStateForFileChanged(filePath, clean))
          self.pages.addWidget(tab)
          return newIndex