Skip to content

BaseTrackTableModel: fix Qt6 QVariant deprecation warning#4446

Merged
Holzhaus merged 1 commit intomixxxdj:mainfrom
Be-ing:basetracktablemodel_qmetatype
Oct 17, 2021
Merged

BaseTrackTableModel: fix Qt6 QVariant deprecation warning#4446
Holzhaus merged 1 commit intomixxxdj:mainfrom
Be-ing:basetracktablemodel_qmetatype

Conversation

@Be-ing
Copy link
Copy Markdown
Contributor

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

../src/library/basetracktablemodel.cpp: In member function ‘QVariant BaseTrackTableModel::roleValue(const QModelIndex&, QVariant&&, int) const’:
../src/library/basetracktablemodel.cpp:649:30: warning: ‘QVariant::Type QVariant::type() const’ is deprecated: Use typeId() or metaType(). [-Wdeprecated-declarations]
  649 |             if (rawValue.type() == QVariant::String) {
      |                 ~~~~~~~~~~~~~^~
In file included from /usr/include/qt6/QtCore/qabstractitemmodel.h:47,
                 from /usr/include/qt6/QtCore/QAbstractTableModel:1,
                 from ../src/library/basetracktablemodel.h:3,
                 from ../src/library/basetracktablemodel.cpp:1:
/usr/include/qt6/QtCore/qvariant.h:337:10: note: declared here
  337 |     Type type() const
      |          ^~~~

Comment thread src/library/basetracktablemodel.cpp Outdated
../src/library/basetracktablemodel.cpp: In member function ‘QVariant BaseTrackTableModel::roleValue(const QModelIndex&, QVariant&&, int) const’:
../src/library/basetracktablemodel.cpp:649:30: warning: ‘QVariant::Type QVariant::type() const’ is deprecated: Use typeId() or metaType(). [-Wdeprecated-declarations]
  649 |             if (rawValue.type() == QVariant::String) {
      |                 ~~~~~~~~~~~~~^~
In file included from /usr/include/qt6/QtCore/qabstractitemmodel.h:47,
                 from /usr/include/qt6/QtCore/QAbstractTableModel:1,
                 from ../src/library/basetracktablemodel.h:3,
                 from ../src/library/basetracktablemodel.cpp:1:
/usr/include/qt6/QtCore/qvariant.h:337:10: note: declared here
  337 |     Type type() const
      |          ^~~~
@Be-ing Be-ing force-pushed the basetracktablemodel_qmetatype branch from 4918c86 to 38a5f02 Compare October 16, 2021 23:14
Copy link
Copy Markdown
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

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

Thanks!

@Holzhaus Holzhaus merged commit 02a3769 into mixxxdj:main Oct 17, 2021
@Be-ing Be-ing deleted the basetracktablemodel_qmetatype branch October 17, 2021 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants