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

Prevent QObject::connect nullptr warning on startup #2349

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

phw
Copy link
Member

@phw phw commented Dec 19, 2023

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

On startup the following error message is printed:

qt.core.qobject.connect: QObject::connect(QObject, Unknown): invalid nullptr parameter

This is caused by the call to QSslSocket.sslLibraryVersionString() in picard.util.version, which expects an initialized Qt application but was called before this exists.

Solution

  • Fill the version list on demand.
  • When running with "-V" CLI flag initialize a QCoreApplication.

QSslSocket.sslLibraryVersionString() expects an initialized Qt application.
Fill the version list on demand. When running with "-V" CLI flag
initialize a QCoreApplication.
@phw phw requested a review from zas December 19, 2023 21:45
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

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

Good fix, LGTM

@phw phw merged commit a8e9b60 into metabrainz:master Dec 19, 2023
44 checks passed
@phw phw deleted the prevent-qobject.connect-nullptr-warning branch December 19, 2023 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants