code: def readViewSettings(self, settings=None): # TODO: rename to readProfile?
          
          if settings is None:
              settings = QtCore.QSettings()
          logger.debug("Reading settings from: {}".format(settings.group()))
  
          self.restoreGeometry(settings.value("geometry"))
          self.restoreState(settings.value("state"))
  
          self.repoWidget.repoTreeView.readViewSettings('repo_tree/header_state', settings)
          self.configWidget.configTreeView.readViewSettings('config_tree/header_state', settings)
  
          #self._configTreeModel.readModelSettings('config_model', settings)
          settings.beginGroup('cfg_inspectors')
          try:
              for key in settings.childKeys():
                  json = settings.value(key)
                  self._inspectorsNonDefaults[key] = ctiLoads(json)
          finally:
              settings.endGroup()
  
          identifier = settings.value("inspector", None)
          try:
              if identifier:
                  self.setInspectorById(identifier)
          except KeyError as ex:
              logger.warn("No inspector with ID {!r}.: {}".format(identifier, ex))
docs: Reads the persistent program settings
  
              :param settings: optional QSettings object which can have a group already opened.
              :returns: True if the header state was restored, otherwise returns False