Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Project converter: Missing conversion for button_pressed for nodes extending BaseButton #74410

Open
Tracked by #73960
nobuyukinyuu opened this issue Mar 5, 2023 · 5 comments

Comments

@nobuyukinyuu
Copy link
Contributor

Godot version

4.0 stable

System information

Windows 10

Issue description

BaseButton Property pressed has changed from a bool to a signal. Code explicitly referencing nodes extending BaseButton do not change this property nor warn the user that the property has changed when migrating from 3.x to 4.0.

There may be issues regarding object qualification if converter doesn't do this yet, addressed in other issues (I don't know if an issue specific to this is filed or how to word it since I don't know the state of the internals of the project converter). It should at least be possible to qualify nodes that exist at design time...

Steps to reproduce

Migrate 3.x project to 4.0

Minimal reproduction project

n/a

@YuriSizov
Copy link
Contributor

This is not going to be possible to address, because convertor has no context and is simply doing substitutions. So something as common as "pressed" would result in many false positives.

@Reneator
Copy link

Reneator commented Mar 6, 2023

pressed would become button_pressed in godot 4

@Zireael07
Copy link
Contributor

@Reneator as Yuri said the word pressed is impossible to convert because the converter doesn't know the context

@nobuyukinyuu
Copy link
Contributor Author

nobuyukinyuu commented Mar 6, 2023

This is why I mentioned type qualification, which I'm not sure if this is an appropriate issue for addressing here directly, but if there is an existing proposal or tracker this can be moved to encapsulate all project converter issues which require type qualification, by all means please link it. In my first issue referencing converter problems I linked #67003 because it's the first issue being tracked I noticed where qualification issues were being discussed.

Basic qualification can still be done in instances where a NodePath is known at design time. (The autocomplete hinter already appears to do this.)

@YuriSizov
Copy link
Contributor

@nobuyukinyuu This issue is fine, it's just unlikely to be fixed, unless someone wants to reimplement the convertor to be smarter than just a bunch of regex substitutions.

@akien-mga akien-mga added enhancement and removed bug labels Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants