'Restore all items expanded state'

def restore_expanded_state(self):

    if (self.__expanded_state is not None):
        if (isinstance(self.__expanded_state, list) and (not is_pyqt46)):
            self.fsmodel.directoryLoaded.connect(self.restore_directory_state)
            self.fsmodel.directoryLoaded.connect(self.follow_directories_loaded)
