summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-23 10:17:27 +0200
committerGitHub <noreply@github.com>2021-10-23 10:17:27 +0200
commit11efbd582e8c5fa9213ab86b54b04c27e4755522 (patch)
tree04b413922b0011b0f5da0792d5fa6632c39ca989 /scene/gui
parentf1f51f5d4b2a4cdf9668fb90387c5d062f2a548b (diff)
parent4f8dfa16671afc35daeb974533aa44f75438ca9b (diff)
Merge pull request #54141 from timothyqiu/bbcode-parse
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp8
-rw-r--r--scene/gui/rich_text_label.h4
2 files changed, 5 insertions, 7 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index bc6552c208..b3788f6317 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -2815,12 +2815,12 @@ bool RichTextLabel::is_scroll_following() const {
return scroll_follow;
}
-Error RichTextLabel::parse_bbcode(const String &p_bbcode) {
+void RichTextLabel::parse_bbcode(const String &p_bbcode) {
clear();
- return append_text(p_bbcode);
+ append_text(p_bbcode);
}
-Error RichTextLabel::append_text(const String &p_bbcode) {
+void RichTextLabel::append_text(const String &p_bbcode) {
int pos = 0;
List<String> tag_stack;
@@ -3543,8 +3543,6 @@ Error RichTextLabel::append_text(const String &p_bbcode) {
break;
}
}
-
- return OK;
}
void RichTextLabel::scroll_to_paragraph(int p_paragraph) {
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 94f02a3989..48186ca8b8 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -552,8 +552,8 @@ public:
String get_selected_text() const;
void selection_copy();
- Error parse_bbcode(const String &p_bbcode);
- Error append_text(const String &p_bbcode);
+ void parse_bbcode(const String &p_bbcode);
+ void append_text(const String &p_bbcode);
void set_use_bbcode(bool p_enable);
bool is_using_bbcode() const;