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

QCoreApplication::quit() is not working before app.exec() #459

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

jmlich
Copy link
Contributor

@jmlich jmlich commented Jan 19, 2025

According to the documentation https://doc.qt.io/qt-6/qcoreapplication.html#quit, QCoreApplication::quit() works only when app.exec() is running.

The DeviceInterface::registerDBus function is invoked within the DeviceInterface constructor, which occurs before app.exec(). As a result, the second instance of the daemon fails to register the DBus interface but does not exit immediately.

Steps to reproduce the issue:

  • Try to run two instances of the daemon.
  • Expected result: The second instance should exit immediately upon startup.

@jmlich jmlich changed the title QCoreApplication::quit() is not working QCoreApplication::quit() is not working before app.exec() Jan 19, 2025
@piggz piggz merged commit d0508a6 into piggz:master Jan 19, 2025
7 checks passed
@jmlich jmlich deleted the quit-doesnt-work branch January 20, 2025 07: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