diff options
author | Fredia Huya-Kouadio <fhuya@fb.com> | 2022-08-14 19:26:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-14 19:26:22 -0700 |
commit | 5a8d786ef9dcfd5b206ec3eeb5e369930e773acc (patch) | |
tree | 2274723d72b9dabc2107a6cc87b86b22288c1d13 /platform/ios/export/export_plugin.cpp | |
parent | 128d68796d9f412a5b05cca8714f217341cfa376 (diff) | |
parent | 45c73775561808ccb2eb4a59927d9c59965e3d20 (diff) | |
download | redot-engine-5a8d786ef9dcfd5b206ec3eeb5e369930e773acc.tar.gz |
Merge pull request #63122 from m4gr3d/split_can_export_main
Refactor the export checking logic to improve separation of concerns
Diffstat (limited to 'platform/ios/export/export_plugin.cpp')
-rw-r--r-- | platform/ios/export/export_plugin.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index 001c9b803d..2771ab8ca2 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -1817,7 +1817,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p return OK; } -bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformIOS::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { String err; bool valid = false; @@ -1842,7 +1842,18 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset valid = dvalid || rvalid; r_missing_templates = !valid; - // Validate the rest of the configuration. + if (!err.is_empty()) { + r_error = err; + } + + return valid; +} + +bool EditorExportPlatformIOS::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { + String err; + bool valid = true; + + // Validate the project configuration. String team_id = p_preset->get("application/app_store_team_id"); if (team_id.length() == 0) { |