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

replace deprecated QVariant::canConvert with templated version #4434

Merged
merged 1 commit into from
Oct 16, 2021

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Oct 16, 2021

No description provided.

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

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

I don't see anywhere in the Qt docs that the Metatype based version got deprecated, though I guess using the templated version may allow the compiler to optimize more.

@Be-ing
Copy link
Contributor Author

Be-ing commented Oct 16, 2021

@Swiftb0y
Copy link
Member

Right, passing the int got deprecated, but passing the member of the QVariant::Type enum is still valid. I'm not sure what overload exactly we were calling in the previous version, but it seemed to be the overload taking the enum member.

@Be-ing
Copy link
Contributor Author

Be-ing commented Oct 16, 2021

The enum is an int.

QVariant was rewritten in Qt6 to use QMetaType. https://doc.qt.io/qt-6/qtcore-changes-qt6.html#meta-type-system

@Be-ing Be-ing merged commit 28be756 into mixxxdj:main Oct 16, 2021
@Be-ing Be-ing deleted the canConvert branch October 16, 2021 19:12
@Swiftb0y
Copy link
Member

Sorry, waited for CI yesterday but then forgot to merge once it passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants