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

Implement own lessThan(QVariant, QVariant) #81

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

olafmandel
Copy link

Qt 5.15 deprecated the operator<(QVariant, QVariant). Do get rid of the
warning and to prepare for the eventual removal of the operator,
implement our own needs in a lessThan() function.

The function is based on the description of
QSortFilterProxyModel::lessThan().

Fixes #77

Qt 5.15 deprecated the operator<(QVariant, QVariant). Do get rid of the
warning and to prepare for the eventual removal of the operator,
implement our own needs in a lessThan() function.

The function is based on the description of
QSortFilterProxyModel::lessThan().

Fixes oKcerG#77
The method `QVariant::Type QVariant::type() const` has been deprecated
since Qt 6.0. The recommended replacement is `typeId()` or `metaType()`,
but these are not available under Qt5. So choose to use `userType()`
instead, which is available under both and should cover the use cases as
well.
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.

Deprecation warnings when compiling with Qt 5.15
1 participant