Skip to content

Fix use of deprecated API in example #4414

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

Merged
merged 2 commits into from
Jul 3, 2025
Merged

Fix use of deprecated API in example #4414

merged 2 commits into from
Jul 3, 2025

Conversation

TatuLund
Copy link
Contributor

@TatuLund TatuLund commented Jul 2, 2025

No description provided.

Copy link

github-actions bot commented Jul 2, 2025

AI Language Review

The primary change in the MenuBarDividers file is the modification of the method used to add an Hr component. The new version uses addComponent(new Hr()), whereas the previous version used add(new Hr()).

  • Ensure consistency in method usage. If the intended method to use for adding components within the context of a SubMenu is indeed addComponent(), verify that there are no overlooked reasons for this change in terms of framework updates or method deprecations.
  • If addComponent() has specific advantages or is required for new functionality, it would be helpful to include a comment (if possible) explaining the change for clarity and future maintenance.

Make sure that this method call is necessary and intentional, as it deviates from the previously used call style.

@TatuLund TatuLund requested a review from Copilot July 3, 2025 10:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the example code to replace a deprecated add() call with the new addComponent() API.

  • Replaced subMenu.add(new Hr()) with subMenu.addComponent(new Hr()) to avoid using the deprecated method.

@TatuLund TatuLund requested a review from jouni July 3, 2025 10:12
@jouni jouni merged commit d7fc6ea into latest Jul 3, 2025
4 of 5 checks passed
@jouni jouni deleted the menbar-dividers-24.8 branch July 3, 2025 10:25
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.

2 participants