def METHOD_NAME(self, auto):
    # type: (bool) -> None
    if self.__autoCommit != auto:
        self.__autoCommit = auto
        if auto:
            self.buttonbox.accepted.connect(self.editor.commit)
        else:
            self.buttonbox.accepted.disconnect(self.editor.commit)