diff options
Diffstat (limited to 'editor/property_selector.cpp')
-rw-r--r-- | editor/property_selector.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index 877b4552c1..838686ead6 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -181,7 +181,7 @@ void PropertySelector::_update_search() { continue; } - if (search_box->get_text() != String() && E.name.findn(search_text) == -1) { + if (!search_box->get_text().is_empty() && E.name.findn(search_text) == -1) { continue; } @@ -194,7 +194,7 @@ void PropertySelector::_update_search() { item->set_metadata(0, E.name); item->set_icon(0, type_icons[E.type]); - if (!found && search_box->get_text() != String() && E.name.findn(search_text) != -1) { + if (!found && !search_box->get_text().is_empty() && E.name.findn(search_text) != -1) { item->select(0); found = true; } @@ -269,7 +269,7 @@ void PropertySelector::_update_search() { continue; } - if (search_box->get_text() != String() && name.findn(search_text) == -1) { + if (!search_box->get_text().is_empty() && name.findn(search_text) == -1) { continue; } @@ -318,7 +318,7 @@ void PropertySelector::_update_search() { item->set_metadata(0, name); item->set_selectable(0, true); - if (!found && search_box->get_text() != String() && name.findn(search_text) != -1) { + if (!found && !search_box->get_text().is_empty() && name.findn(search_text) != -1) { item->select(0); found = true; } @@ -353,7 +353,7 @@ void PropertySelector::_item_selected() { String class_type; if (type != Variant::NIL) { class_type = Variant::get_type_name(type); - } else if (base_type != String()) { + } else if (!base_type.is_empty()) { class_type = base_type; } else if (instance) { class_type = instance->get_class(); @@ -362,7 +362,7 @@ void PropertySelector::_item_selected() { DocTools *dd = EditorHelp::get_doc_data(); String text; if (properties) { - while (class_type != String()) { + while (!class_type.is_empty()) { Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_type); if (E) { for (int i = 0; i < E->get().properties.size(); i++) { @@ -373,7 +373,7 @@ void PropertySelector::_item_selected() { } } - if (text != String()) { + if (!text.is_empty()) { break; } @@ -381,7 +381,7 @@ void PropertySelector::_item_selected() { class_type = ClassDB::get_parent_class(class_type); } } else { - while (class_type != String()) { + while (!class_type.is_empty()) { Map<String, DocData::ClassDoc>::Element *E = dd->class_list.find(class_type); if (E) { for (int i = 0; i < E->get().methods.size(); i++) { @@ -392,7 +392,7 @@ void PropertySelector::_item_selected() { } } - if (text != String()) { + if (!text.is_empty()) { break; } @@ -401,7 +401,7 @@ void PropertySelector::_item_selected() { } } - if (text != String()) { + if (!text.is_empty()) { // Display both property name and description, since the help bit may be displayed // far away from the location (especially if the dialog was resized to be taller). help_bit->set_text(vformat("[b]%s[/b]: %s", name, text)); |