Make some editor export methods const
This commit is contained in:
parent
5352cf8e2f
commit
a0072ba39f
|
@ -428,7 +428,7 @@ void EditorExportPlatform::_edit_filter_list(HashSet<String> &r_list, const Stri
|
|||
_edit_files_with_filter(da, filters, r_list, exclude);
|
||||
}
|
||||
|
||||
EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) {
|
||||
EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) const {
|
||||
Ref<EditorExportPlatform> platform = p_preset->get_platform();
|
||||
List<String> feature_list;
|
||||
platform->get_platform_features(&feature_list);
|
||||
|
|
|
@ -110,14 +110,14 @@ protected:
|
|||
~ExportNotifier();
|
||||
};
|
||||
|
||||
FeatureContainers get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug);
|
||||
FeatureContainers get_feature_containers(const Ref<EditorExportPreset> &p_preset, bool p_debug) const;
|
||||
|
||||
bool exists_export_template(String template_file_name, String *err) const;
|
||||
String find_export_template(String template_file_name, String *err = nullptr) const;
|
||||
void gen_export_flags(Vector<String> &r_flags, int p_flags);
|
||||
|
||||
public:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) = 0;
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const = 0;
|
||||
|
||||
struct ExportOption {
|
||||
PropertyInfo option;
|
||||
|
@ -211,7 +211,7 @@ public:
|
|||
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) = 0;
|
||||
virtual Error export_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
|
||||
virtual Error export_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
|
||||
virtual void get_platform_features(List<String> *r_features) = 0;
|
||||
virtual void get_platform_features(List<String> *r_features) const = 0;
|
||||
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) = 0;
|
||||
virtual String get_debug_protocol() const { return "tcp://"; }
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "core/config/project_settings.h"
|
||||
|
||||
void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
|
||||
if (p_preset->get("texture_format/s3tc")) {
|
||||
r_features->push_back("s3tc");
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) {
|
|||
logo = p_logo;
|
||||
}
|
||||
|
||||
void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
|
||||
void EditorExportPlatformPC::get_platform_features(List<String> *r_features) const {
|
||||
r_features->push_back("pc"); //all pcs support "pc"
|
||||
r_features->push_back("s3tc"); //all pcs support "s3tc" compression
|
||||
r_features->push_back(get_os_name().to_lower()); //OS name is a feature
|
||||
|
|
|
@ -44,7 +44,7 @@ private:
|
|||
int chmod_flags = -1;
|
||||
|
||||
public:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
|
||||
|
||||
virtual void get_export_options(List<ExportOption> *r_options) override;
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
void set_logo(const Ref<Texture2D> &p_logo);
|
||||
|
||||
void add_platform_feature(const String &p_feature);
|
||||
virtual void get_platform_features(List<String> *r_features) override;
|
||||
virtual void get_platform_features(List<String> *r_features) const override;
|
||||
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
|
||||
|
||||
int get_chmod_flags() const;
|
||||
|
|
|
@ -1671,7 +1671,7 @@ Vector<String> EditorExportPlatformAndroid::get_enabled_abis(const Ref<EditorExp
|
|||
return enabled_abis;
|
||||
}
|
||||
|
||||
void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
|
||||
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
|
||||
if (driver == "opengl3") {
|
||||
r_features->push_back("etc");
|
||||
|
@ -3109,7 +3109,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
|
|||
CLEANUP_AND_RETURN(OK);
|
||||
}
|
||||
|
||||
void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features) {
|
||||
void EditorExportPlatformAndroid::get_platform_features(List<String> *r_features) const {
|
||||
r_features->push_back("mobile");
|
||||
r_features->push_back("android");
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ public:
|
|||
typedef Error (*EditorExportSaveFunction)(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
|
||||
|
||||
public:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
|
||||
|
||||
virtual void get_export_options(List<ExportOption> *r_options) override;
|
||||
|
||||
|
@ -231,7 +231,7 @@ public:
|
|||
|
||||
Error export_project_helper(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int export_format, bool should_sign, int p_flags);
|
||||
|
||||
virtual void get_platform_features(List<String> *r_features) override;
|
||||
virtual void get_platform_features(List<String> *r_features) const override;
|
||||
|
||||
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "editor/editor_node.h"
|
||||
|
||||
void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
|
||||
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
|
||||
// Vulkan and OpenGL ES 3.0 both mandate ETC2 support.
|
||||
r_features->push_back("etc2");
|
||||
|
@ -43,7 +43,7 @@ void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset>
|
|||
}
|
||||
}
|
||||
|
||||
Vector<EditorExportPlatformIOS::ExportArchitecture> EditorExportPlatformIOS::_get_supported_architectures() {
|
||||
Vector<EditorExportPlatformIOS::ExportArchitecture> EditorExportPlatformIOS::_get_supported_architectures() const {
|
||||
Vector<ExportArchitecture> archs;
|
||||
archs.push_back(ExportArchitecture("arm64", true));
|
||||
return archs;
|
||||
|
@ -1155,7 +1155,7 @@ Error EditorExportPlatformIOS::_export_additional_assets(const String &p_out_dir
|
|||
return OK;
|
||||
}
|
||||
|
||||
Vector<String> EditorExportPlatformIOS::_get_preset_architectures(const Ref<EditorExportPreset> &p_preset) {
|
||||
Vector<String> EditorExportPlatformIOS::_get_preset_architectures(const Ref<EditorExportPreset> &p_preset) const {
|
||||
Vector<ExportArchitecture> all_archs = _get_supported_architectures();
|
||||
Vector<String> enabled_archs;
|
||||
for (int i = 0; i < all_archs.size(); ++i) {
|
||||
|
|
|
@ -106,8 +106,8 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
|
|||
Error _export_loading_screen_file(const Ref<EditorExportPreset> &p_preset, const String &p_dest_dir);
|
||||
Error _export_icons(const Ref<EditorExportPreset> &p_preset, const String &p_iconset_dir);
|
||||
|
||||
Vector<ExportArchitecture> _get_supported_architectures();
|
||||
Vector<String> _get_preset_architectures(const Ref<EditorExportPreset> &p_preset);
|
||||
Vector<ExportArchitecture> _get_supported_architectures() const;
|
||||
Vector<String> _get_preset_architectures(const Ref<EditorExportPreset> &p_preset) const;
|
||||
|
||||
void _add_assets_to_project(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_project_data, const Vector<IOSExportAsset> &p_additional_assets);
|
||||
Error _export_additional_assets(const String &p_out_dir, const Vector<String> &p_assets, bool p_is_framework, bool p_should_embed, Vector<IOSExportAsset> &r_exported_assets);
|
||||
|
@ -173,7 +173,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
|
||||
virtual void get_export_options(List<ExportOption> *r_options) override;
|
||||
|
||||
public:
|
||||
|
@ -199,7 +199,7 @@ public:
|
|||
|
||||
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
|
||||
|
||||
virtual void get_platform_features(List<String> *r_features) override {
|
||||
virtual void get_platform_features(List<String> *r_features) const override {
|
||||
r_features->push_back("mobile");
|
||||
r_features->push_back("ios");
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ Error EditorExportPlatformJavaScript::_build_pwa(const Ref<EditorExportPreset> &
|
|||
return OK;
|
||||
}
|
||||
|
||||
void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
void EditorExportPlatformJavaScript::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
|
||||
if (p_preset->get("vram_texture_compression/for_desktop")) {
|
||||
r_features->push_back("s3tc");
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ class EditorExportPlatformJavaScript : public EditorExportPlatform {
|
|||
static void _server_thread_poll(void *data);
|
||||
|
||||
public:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
|
||||
|
||||
virtual void get_export_options(List<ExportOption> *r_options) override;
|
||||
|
||||
|
@ -130,7 +130,7 @@ public:
|
|||
virtual Error run(const Ref<EditorExportPreset> &p_preset, int p_option, int p_debug_flags) override;
|
||||
virtual Ref<Texture2D> get_run_icon() const override;
|
||||
|
||||
virtual void get_platform_features(List<String> *r_features) override {
|
||||
virtual void get_platform_features(List<String> *r_features) const override {
|
||||
r_features->push_back("web");
|
||||
r_features->push_back(get_os_name().to_lower());
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "modules/modules_enabled.gen.h" // For regex.
|
||||
|
||||
void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
|
||||
if (p_preset->get("texture_format/s3tc")) {
|
||||
r_features->push_back("s3tc");
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ class EditorExportPlatformMacOS : public EditorExportPlatform {
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
|
||||
virtual void get_export_options(List<ExportOption> *r_options) override;
|
||||
virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override;
|
||||
|
||||
|
@ -121,7 +121,7 @@ public:
|
|||
|
||||
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
|
||||
|
||||
virtual void get_platform_features(List<String> *r_features) override {
|
||||
virtual void get_platform_features(List<String> *r_features) const override {
|
||||
r_features->push_back("pc");
|
||||
r_features->push_back("s3tc");
|
||||
r_features->push_back("macos");
|
||||
|
|
|
@ -49,7 +49,7 @@ Ref<Texture2D> EditorExportPlatformUWP::get_logo() const {
|
|||
return logo;
|
||||
}
|
||||
|
||||
void EditorExportPlatformUWP::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
void EditorExportPlatformUWP::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const {
|
||||
r_features->push_back("s3tc");
|
||||
r_features->push_back("etc");
|
||||
switch ((int)p_preset->get("architecture/target")) {
|
||||
|
@ -494,7 +494,7 @@ Error EditorExportPlatformUWP::export_project(const Ref<EditorExportPreset> &p_p
|
|||
return OK;
|
||||
}
|
||||
|
||||
void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) {
|
||||
void EditorExportPlatformUWP::get_platform_features(List<String> *r_features) const {
|
||||
r_features->push_back("pc");
|
||||
r_features->push_back("uwp");
|
||||
}
|
||||
|
|
|
@ -431,7 +431,7 @@ public:
|
|||
|
||||
virtual Ref<Texture2D> get_logo() const override;
|
||||
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) override;
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override;
|
||||
|
||||
virtual void get_export_options(List<ExportOption> *r_options) override;
|
||||
|
||||
|
@ -439,7 +439,7 @@ public:
|
|||
|
||||
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
|
||||
|
||||
virtual void get_platform_features(List<String> *r_features) override;
|
||||
virtual void get_platform_features(List<String> *r_features) const override;
|
||||
|
||||
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue