Skip to content

chore: add a closingDown guard for quit/exit#111

Merged
caybro merged 1 commit into
upstream-rebasefrom
fix/21082-closingdown-guard
Jun 2, 2026
Merged

chore: add a closingDown guard for quit/exit#111
caybro merged 1 commit into
upstream-rebasefrom
fix/21082-closingdown-guard

Conversation

@caybro
Copy link
Copy Markdown
Member

@caybro caybro commented Jun 1, 2026

  • also use the typesafe functors, instead of string based method lookup

Iterates status-im/status-app#21082

- also use the typesafe functors, instead of string based method lookup

Iterates status-im/status-app#21082
Copy link
Copy Markdown

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

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 / exit invocations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@caybro caybro merged commit 3dc2d46 into upstream-rebase Jun 2, 2026
1 check passed
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
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.

4 participants