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

QtFRED dialogs: consistent reusable attributes and handlers #6458

Open
Goober5000 opened this issue Dec 12, 2024 · 1 comment
Open

QtFRED dialogs: consistent reusable attributes and handlers #6458

Goober5000 opened this issue Dec 12, 2024 · 1 comment
Assignees
Labels
qtfred A feature or issue related to qtFred. refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability

Comments

@Goober5000
Copy link
Contributor

Goober5000 commented Dec 12, 2024

From PR #6322, in regards to void ShipCustomWarpDialog::rejectHandler():

This seems like a common enough pattern that it should be in the superclass or in a utility function somewhere, though maybe that's beyond the scope of this PR.

And also in regards to void ShipCustomWarpDialog::startSoundChanged():

The string wrangling should definitely be in a utility function. If you want to do that in a different PR that's fine; but if string wrangling is necessary, then there should be qtFRED-wide utility functions for converting from Qstring to std::string and vice versa.

More generally, it would be useful to reuse code as much as possible in qtFRED, since a lot of the dialogs involve a lot of boilerplate. Templates and pointers-to-members could help here, so for example a simple get/set of an attribute could use templated logic that applies for all such simple fields in the dialog.

@Goober5000 Goober5000 added qtfred A feature or issue related to qtFred. refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability labels Dec 12, 2024
@github-project-automation github-project-automation bot moved this to Open Tasks in qtFRED2 Dec 12, 2024
@TheForce172
Copy link
Contributor

TheForce172 commented Dec 13, 2024

Assign all these to me and I'll see them done over the next week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qtfred A feature or issue related to qtFred. refactor A cleanup/restructure of a feature for speed, simplicity, and/or maintainability
Projects
Status: Open Tasks
Development

No branches or pull requests

2 participants