Make conversions from NodePath to String explicit.

This commit is contained in:
Lukas Tenbrink
2025-06-11 16:19:23 +02:00
parent 51b0379e55
commit e2931a5c19
39 changed files with 99 additions and 99 deletions

View File

@@ -2381,7 +2381,7 @@ Control *Control::find_next_valid_focus() const {
// If the focus property is manually overwritten, attempt to use it.
if (!data.focus_next.is_empty()) {
Node *n = get_node_or_null(data.focus_next);
ERR_FAIL_NULL_V_MSG(n, nullptr, "Next focus node path is invalid: '" + data.focus_next + "'.");
ERR_FAIL_NULL_V_MSG(n, nullptr, "Next focus node path is invalid: '" + String(data.focus_next) + "'.");
Control *c = Object::cast_to<Control>(n);
ERR_FAIL_NULL_V_MSG(c, nullptr, "Next focus node is not a control: '" + n->get_name() + "'.");
if (c->_is_focusable()) {
@@ -2485,7 +2485,7 @@ Control *Control::find_prev_valid_focus() const {
// If the focus property is manually overwritten, attempt to use it.
if (!data.focus_prev.is_empty()) {
Node *n = get_node_or_null(data.focus_prev);
ERR_FAIL_NULL_V_MSG(n, nullptr, "Previous focus node path is invalid: '" + data.focus_prev + "'.");
ERR_FAIL_NULL_V_MSG(n, nullptr, "Previous focus node path is invalid: '" + String(data.focus_prev) + "'.");
Control *c = Object::cast_to<Control>(n);
ERR_FAIL_NULL_V_MSG(c, nullptr, "Previous focus node is not a control: '" + n->get_name() + "'.");
if (c->_is_focusable()) {
@@ -2605,7 +2605,7 @@ Control *Control::_get_focus_neighbor(Side p_side, int p_count) {
}
if (!data.focus_neighbor[p_side].is_empty()) {
Node *n = get_node_or_null(data.focus_neighbor[p_side]);
ERR_FAIL_NULL_V_MSG(n, nullptr, "Neighbor focus node path is invalid: '" + data.focus_neighbor[p_side] + "'.");
ERR_FAIL_NULL_V_MSG(n, nullptr, "Neighbor focus node path is invalid: '" + String(data.focus_neighbor[p_side]) + "'.");
Control *c = Object::cast_to<Control>(n);
ERR_FAIL_NULL_V_MSG(c, nullptr, "Neighbor focus node is not a control: '" + n->get_name() + "'.");
if (c->_is_focusable()) {