code: def _updateFilename(self):
          
          self._filename = self._filenameLineEdit.text()
          self._guessEncoding(self._filename)
          self._previewFile()
docs: Calls several methods after the filename changed.
  
          This method is also a `SLOT`.
          It checks the encoding of the changed filename and generates a
          preview of the data.