summaryrefslogtreecommitdiffstats
path: root/editor/editor_help_search.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_help_search.cpp')
-rw-r--r--editor/editor_help_search.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index ff381d68c0..f42cc62fe2 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -40,7 +40,7 @@
bool EditorHelpSearch::_all_terms_in_name(const Vector<String> &p_terms, const String &p_name) const {
for (int i = 0; i < p_terms.size(); i++) {
- if (p_name.findn(p_terms[i]) < 0) {
+ if (!p_name.containsn(p_terms[i])) {
return false;
}
}
@@ -109,7 +109,7 @@ Dictionary EditorHelpSearch::_native_search_cb(const String &p_search_string, in
if (class_doc.name.is_empty()) {
continue;
}
- if (class_doc.name.findn(term) > -1) {
+ if (class_doc.name.containsn(term)) {
ret[vformat("class_name:%s", class_doc.name)] = class_doc.name;
}
if (term.length() > 1 || term == "@") {
@@ -315,7 +315,7 @@ EditorHelpSearch::EditorHelpSearch() {
search_box->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
search_box->set_clear_button_enabled(true);
- search_box->connect("gui_input", callable_mp(this, &EditorHelpSearch::_search_box_gui_input));
+ search_box->connect(SceneStringName(gui_input), callable_mp(this, &EditorHelpSearch::_search_box_gui_input));
search_box->connect("text_changed", callable_mp(this, &EditorHelpSearch::_search_box_text_changed));
register_text_enter(search_box);
hbox->add_child(search_box);
@@ -323,7 +323,7 @@ EditorHelpSearch::EditorHelpSearch() {
case_sensitive_button = memnew(Button);
case_sensitive_button->set_theme_type_variation("FlatButton");
case_sensitive_button->set_tooltip_text(TTR("Case Sensitive"));
- case_sensitive_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results));
+ case_sensitive_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelpSearch::_update_results));
case_sensitive_button->set_toggle_mode(true);
case_sensitive_button->set_focus_mode(Control::FOCUS_NONE);
hbox->add_child(case_sensitive_button);
@@ -331,7 +331,7 @@ EditorHelpSearch::EditorHelpSearch() {
hierarchy_button = memnew(Button);
hierarchy_button->set_theme_type_variation("FlatButton");
hierarchy_button->set_tooltip_text(TTR("Show Hierarchy"));
- hierarchy_button->connect("pressed", callable_mp(this, &EditorHelpSearch::_update_results));
+ hierarchy_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelpSearch::_update_results));
hierarchy_button->set_toggle_mode(true);
hierarchy_button->set_pressed(true);
hierarchy_button->set_focus_mode(Control::FOCUS_NONE);
@@ -744,9 +744,9 @@ String EditorHelpSearch::Runner::_match_keywords_in_all_terms(const String &p_ke
bool EditorHelpSearch::Runner::_match_string(const String &p_term, const String &p_string) const {
if (search_flags & SEARCH_CASE_SENSITIVE) {
- return p_string.find(p_term) > -1;
+ return p_string.contains(p_term);
} else {
- return p_string.findn(p_term) > -1;
+ return p_string.containsn(p_term);
}
}