def METHOD_NAME(self):
    def _content_error(title, text):
        ret = QtWidgets.QMessageBox.warning(self, title, text,
                                        QtWidgets.QMessageBox.Discard,
                                        QtWidgets.QMessageBox.Cancel)
        if ret == QtWidgets.QMessageBox.Discard:
            self.discard_changes()
    # load new content
    try:
        txt = self.edit.toPlainText()
        data = yaml.load(str(txt), Loader=yaml.FullLoader)
    except YAMLError as e:
        _content_error("Invalid syntax", str(e))
        return
    # check against schema
    if self.schema:
        try:
            data = self.schema.validate(data)
        except SchemaError as e:
            _content_error("Settings validation failure", str(e))
            return
    # apply to context model
    self.context_model.set_packages_path(data["packages_path"])
    self.context_model.set_package_filter(data["package_filter"])
    self.context_model.set_caching(data["caching"])
    self._update_text()