diff options
Diffstat (limited to 'editor/project_converter_3_to_4.h')
-rw-r--r-- | editor/project_converter_3_to_4.h | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/editor/project_converter_3_to_4.h b/editor/project_converter_3_to_4.h index 641bc467ac..420dd79d72 100644 --- a/editor/project_converter_3_to_4.h +++ b/editor/project_converter_3_to_4.h @@ -33,31 +33,36 @@ #ifndef DISABLE_DEPRECATED -#include "core/io/file_access.h" -#include "core/object/ref_counted.h" +#include "modules/modules_enabled.gen.h" // For regex. + +#ifndef MODULE_REGEX_ENABLED + +#include "core/error/error_macros.h" + +class ProjectConverter3To4 { +public: + ProjectConverter3To4(int, int) {} + + bool validate_conversion() { + ERR_FAIL_V_MSG(false, "Can't validate conversion for Godot 3.x projects, because RegEx module is disabled."); + } + + bool convert() { + ERR_FAIL_V_MSG(false, "Can't run converter for Godot 3.x projects, because RegEx module is disabled."); + } +}; + +#else // Has regex. + #include "core/string/ustring.h" #include "core/templates/local_vector.h" +#include "core/templates/vector.h" class RegEx; class ProjectConverter3To4 { -public: class RegExContainer; - static const char *enum_renames[][2]; - static const char *gdscript_function_renames[][2]; - static const char *csharp_function_renames[][2]; - static const char *gdscript_properties_renames[][2]; - static const char *csharp_properties_renames[][2]; - static const char *gdscript_signals_renames[][2]; - static const char *csharp_signals_renames[][2]; - static const char *project_settings_renames[][2]; - static const char *input_map_renames[][2]; - static const char *builtin_types_renames[][2]; - static const char *shaders_renames[][2]; - static const char *class_renames[][2]; - static const char *color_renames[][2]; - -private: + uint64_t maximum_file_size; uint64_t maximum_line_length; @@ -108,10 +113,12 @@ private: public: ProjectConverter3To4(int, int); - int validate_conversion(); - int convert(); + bool validate_conversion(); + bool convert(); }; +#endif // MODULE_REGEX_ENABLED + #endif // DISABLE_DEPRECATED #endif // PROJECT_CONVERTER_3_TO_4_H |