Skip to content

Show renaming dialog when autoload auto name is invalid#119086

Open
KoBeWi wants to merge 1 commit intogodotengine:masterfrom
KoBeWi:typical_naming_issue
Open

Show renaming dialog when autoload auto name is invalid#119086
KoBeWi wants to merge 1 commit intogodotengine:masterfrom
KoBeWi:typical_naming_issue

Conversation

@KoBeWi
Copy link
Copy Markdown
Member

@KoBeWi KoBeWi commented Apr 29, 2026

Closes #119055

godot.windows.editor.dev.x86_64_PYW5iIo0ou.mp4

@KoBeWi KoBeWi added this to the 4.7 milestone Apr 29, 2026
@KoBeWi KoBeWi requested a review from a team as a code owner April 29, 2026 14:56
@KoBeWi KoBeWi requested a review from a team April 29, 2026 14:56
Copy link
Copy Markdown
Member

@ajreckof ajreckof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good in terms of usability and code looks but haven't tested it.

For the failed checks it looks like headers are missing as it is passing in scu build only

@KoBeWi KoBeWi force-pushed the typical_naming_issue branch 2 times, most recently from e2b2ec5 to 2dcadc6 Compare April 29, 2026 17:22
@KoBeWi KoBeWi force-pushed the typical_naming_issue branch from 2dcadc6 to f267b72 Compare April 29, 2026 18:28
Comment on lines +466 to +467
if (_autoload_name_is_valid(p_name)) {
_add_autoload(p_name, p_path);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This checks against a wrong name, as _add_autoload afterwards does:

String autoload_name = p_name.to_pascal_case();

The name should be modified before the validation instead of in _add_autoload (so for p_name = game_manager it will detect collision with class_name GameManager; currently it still doesn't work for MRP from #119055).

@Repiteo Repiteo modified the milestones: 4.7, 4.8 Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The class name conflicts with the name of the global node.

4 participants