Skip to content

Fix deprecated syntax failure in publish check#6

Open
peter-jerry-ye wants to merge 2 commits intomoonbit-community:masterfrom
peter-jerry-ye:x9-publish-deprecated-fix
Open

Fix deprecated syntax failure in publish check#6
peter-jerry-ye wants to merge 2 commits intomoonbit-community:masterfrom
peter-jerry-ye:x9-publish-deprecated-fix

Conversation

@peter-jerry-ye
Copy link
Contributor

Summary

  • remove use of drop([window, app, exit_code]) in src/main/main.mbt
  • avoid deprecated implicit empty-trait implementation warning during moon check --deny-warn
  • keep behavior by explicitly ignoring the return value of QApplication::exec()

Why

publish-package failed in upstream run due deprecated_syntax errors from implicit Drop implementation when calling drop(...).

Validation

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b10861f1f4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

window.show()
let exit_code = QApplication::exec()
drop([window, app, exit_code])
ignore(QApplication::exec())

Choose a reason for hiding this comment

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

P1 Badge Preserve Qt object lifetimes during event loop

This change removes the only post-exec() use of app and window, so those Ref objects are now eligible to become unreachable before QApplication::exec() returns; in this codebase, Ref<T> uses a finalizer that runs ~T() when collected, so a GC/RC cycle during the event loop can destroy the live QApplication/Window and cause crashes or lost callbacks while the UI is running. Keeping explicit references alive until after exec() returns is required for correctness.

Useful? React with 👍 / 👎.

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