1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #107408 from Ivorforce/node-path-string-explicit

Make conversions from `NodePath` to `String` explicit.
This commit is contained in:
Rémi Verschelde
2025-06-12 22:49:03 +02:00
39 changed files with 99 additions and 99 deletions

View File

@@ -2382,7 +2382,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()) {
@@ -2486,7 +2486,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()) {
@@ -2606,7 +2606,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()) {