Skip to content

Commit

Permalink
DbId: fix build with Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Oct 14, 2021
1 parent fecfef3 commit f6365c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/util/db/dbid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@


//static
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QMetaType DbId::kVariantType = DbId().toVariant().metaType();
#else
const QVariant::Type DbId::kVariantType = DbId().toVariant().type();
#endif

//static
DbId::value_type DbId::valueOf(QVariant /*pass-by-value*/ variant) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/db/dbid.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class DbId {
static constexpr value_type kInvalidValue = -1;

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
static const QMetaType::Type kVariantType;
static const QMetaType kVariantType;
#else
static const QVariant::Type kVariantType;
#endif
Expand Down

0 comments on commit f6365c3

Please sign in to comment.