1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Refactor the export checking logic to improve separation of concerns

This commit is contained in:
Fredia Huya-Kouadio
2022-07-17 10:22:54 -04:00
parent 1806e414b8
commit d2213f76a9
9 changed files with 120 additions and 21 deletions

View File

@@ -1073,7 +1073,7 @@ public:
}
}
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
String err;
bool valid = false;
@@ -1112,6 +1112,17 @@ public:
valid = dvalid || rvalid;
r_missing_templates = !valid;
if (!err.empty()) {
r_error = err;
}
return valid;
}
virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const {
String err;
bool valid = true;
// Validate the rest of the configuration.
if (!_valid_resource_name(p_preset->get("package/short_name"))) {