Skip to content

RgbColor: fix QVariant deprecation warnings with Qt6#4299

Merged
uklotzde merged 1 commit intomixxxdj:mainfrom
Be-ing:qvariant_qt6
Sep 19, 2021
Merged

RgbColor: fix QVariant deprecation warnings with Qt6#4299
uklotzde merged 1 commit intomixxxdj:mainfrom
Be-ing:qvariant_qt6

Conversation

@Be-ing
Copy link
Copy Markdown
Contributor

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

No description provided.

Comment thread src/util/color/rgbcolor.h Outdated
return defaultColor;
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
VERIFY_OR_DEBUG_ASSERT(varCode.canConvert(QMetaType(QMetaType::UInt))) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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