chore: add a closingDown guard for quit/exit#111
Merged
Conversation
- also use the typesafe functors, instead of string based method lookup Iterates status-im/status-app#21082
There was a problem hiding this comment.
Pull request overview
Adds a closingDown() guard in dos_qguiapplication_quit and dos_qguiapplication_exit to prevent re-entrant quit/exit calls while the application is already shutting down, and switches from string-based QMetaObject::invokeMethod to type-safe functor overloads.
Changes:
- Early-return from quit/exit when
qGuiApp->closingDown()is true. - Use type-safe member function pointers for
QGuiApplication::quit/exitinvocations.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jrainville
approved these changes
Jun 1, 2026
2 tasks
saledjenic
approved these changes
Jun 2, 2026
caybro
added a commit
to status-im/status-app
that referenced
this pull request
Jun 2, 2026
- use the guarded DOS quit/exit methods - in the NIM main `defer` section, just call the `qGuiApp.delete()` destructor - fixes the introduced memleak and also the crash because we were calling `qGuiApp.exit()` method twice; we are using the QQmlApplicationEngine which already connects and propagates the QML quit/exit signals from the engine to the global qGuiApp instance - make sure we call `Qt.exit()` from QML when we really want to quit the app for good Needs status-im/dotherside#111 Fixes #21082
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Iterates status-im/status-app#21082