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

RgbColor: fix QVariant deprecation warnings with Qt6 #4299

Merged
merged 1 commit into from
Sep 19, 2021

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Sep 18, 2021

No description provided.

@@ -182,7 +182,11 @@ class RgbColor {
if (varCode.isNull()) {
return defaultColor;
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
VERIFY_OR_DEBUG_ASSERT(varCode.canConvert(QMetaType(QMetaType::UInt))) {
Copy link
Contributor

@uklotzde uklotzde Sep 18, 2021

Choose a reason for hiding this comment

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

Using canConvert<type>() instead seems to avoid the conditional compilation, e.g. varCode.canConvert<code_t>(). This should also work for DbId.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a better solution. Done.

Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

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

LGTM

@uklotzde uklotzde merged commit 34d29c4 into mixxxdj:main Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants