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

Add ability to ask user to confirm widget creation when not supported by current language #1511

Merged
merged 4 commits into from
Sep 29, 2024

Conversation

Randalphwa
Copy link
Collaborator

This PR changes NodeCreator::createNode and Node::createChildNode so that they take a verify_language_support parameter and return a std::pair<NodeSharedPtr, int> containing the node and an error code. In addition, generators can now override a new SupportedLanguages() method which allows each generator to specify which languages the generator supports. Combining the two changes makes it possible to notify the user that a requested widget is not supported in the project's code_preference setting. The user then has the option of creating the node anyway, or cancelling creation of the widget.

See #1509

By default, this returns all languages. Generators can override this
to limit which languages are supported.

Popup windows are the initial test case since Perl and XRC are not
supported.
Return a std::pair makes it possible to return an error code if the
node could not be created.

Adding verify_language_support results in verifying with the
generator that the language supports the widget being created.
Handles the new std::pair return and the optional
verify_language_support parameter.
@Randalphwa Randalphwa merged commit 2a11597 into main Sep 29, 2024
@Randalphwa Randalphwa deleted the lang_version_check branch September 29, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant