summaryrefslogtreecommitdiff
path: root/scene/gui/rich_text_label.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-06 21:51:36 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-07 11:50:40 +0100
commitf3726ee99488695c4aae22fffd3649499b285faf (patch)
tree72c94797816a2f3da5ad4cb59a177ec74674a357 /scene/gui/rich_text_label.cpp
parentb7297fb39ca7a55390f9390666bd29803adc827f (diff)
Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011. - Remove unused `gdscript` compile option. - Fix build with regex module disabled. - Fix ImageLoaderSVG to forward declare thirdparty structs.
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r--scene/gui/rich_text_label.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 6c2928c65c..af5d0e2f45 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -33,8 +33,13 @@
#include "core/math/math_defs.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
-#include "modules/regex/regex.h"
#include "scene/scene_string_names.h"
+
+#include "modules/modules_enabled.gen.h"
+#ifdef MODULE_REGEX_ENABLED
+#include "modules/regex/regex.h"
+#endif
+
#ifdef TOOLS_ENABLED
#include "editor/editor_scale.h"
#endif
@@ -2864,6 +2869,7 @@ Dictionary RichTextLabel::parse_expressions_for_values(Vector<String> p_expressi
Vector<String> values = parts[1].split(",", false);
+#ifdef MODULE_REGEX_ENABLED
RegEx color = RegEx();
color.compile("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$");
RegEx nodepath = RegEx();
@@ -2897,6 +2903,7 @@ Dictionary RichTextLabel::parse_expressions_for_values(Vector<String> p_expressi
a.append(values[j]);
}
}
+#endif
if (values.size() > 1) {
d[key] = a;