summaryrefslogtreecommitdiffstats
path: root/editor/code_editor.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2023-12-18 15:46:56 +0100
committerkobewi <kobewi4e@gmail.com>2024-01-09 16:11:47 +0100
commit0e8f90f4c8b4b353d3ac372e5f00493a2f0bd136 (patch)
tree9b83683d86b94f9fdf7d6d58594d2b28d88a13ab /editor/code_editor.cpp
parent8297ec949bad8029372da13e1d4e36599989b5ae (diff)
downloadredot-engine-0e8f90f4c8b4b353d3ac372e5f00493a2f0bd136.tar.gz
Update deferred calls to use Callables
Diffstat (limited to 'editor/code_editor.cpp')
-rw-r--r--editor/code_editor.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index b17affa246..d9101466fc 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -336,7 +336,7 @@ void FindReplaceBar::_replace_all() {
matches_label->add_theme_color_override("font_color", rc > 0 ? get_theme_color(SNAME("font_color"), SNAME("Label")) : get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
matches_label->set_text(vformat(TTR("%d replaced."), rc));
- text_editor->call_deferred(SNAME("connect"), "text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed));
+ callable_mp((Object *)text_editor, &Object::connect).call_deferred("text_changed", callable_mp(this, &FindReplaceBar::_editor_text_changed), 0U);
results_count = -1;
results_count_to_current = -1;
needs_to_count_results = true;
@@ -517,10 +517,10 @@ void FindReplaceBar::_show_search(bool p_focus_replace, bool p_show_only) {
if (p_focus_replace) {
search_text->deselect();
- replace_text->call_deferred(SNAME("grab_focus"));
+ callable_mp((Control *)replace_text, &Control::grab_focus).call_deferred();
} else {
replace_text->deselect();
- search_text->call_deferred(SNAME("grab_focus"));
+ callable_mp((Control *)search_text, &Control::grab_focus).call_deferred();
}
if (text_editor->has_selection(0) && !is_selection_only()) {
@@ -1572,20 +1572,20 @@ void CodeTextEditor::goto_line(int p_line) {
text_editor->remove_secondary_carets();
text_editor->deselect();
text_editor->unfold_line(p_line);
- text_editor->call_deferred(SNAME("set_caret_line"), p_line);
+ callable_mp((TextEdit *)text_editor, &TextEdit::set_caret_line).call_deferred(p_line, true, true, 0, 0);
}
void CodeTextEditor::goto_line_selection(int p_line, int p_begin, int p_end) {
text_editor->remove_secondary_carets();
text_editor->unfold_line(p_line);
- text_editor->call_deferred(SNAME("set_caret_line"), p_line);
- text_editor->call_deferred(SNAME("set_caret_column"), p_begin);
+ callable_mp((TextEdit *)text_editor, &TextEdit::set_caret_line).call_deferred(p_line, true, true, 0, 0);
+ callable_mp((TextEdit *)text_editor, &TextEdit::set_caret_column).call_deferred(p_begin, true, 0);
text_editor->select(p_line, p_begin, p_line, p_end);
}
void CodeTextEditor::goto_line_centered(int p_line) {
goto_line(p_line);
- text_editor->call_deferred(SNAME("center_viewport_to_caret"));
+ callable_mp((TextEdit *)text_editor, &TextEdit::center_viewport_to_caret).call_deferred(0);
}
void CodeTextEditor::set_executing_line(int p_line) {