Skip to content

Commit

Permalink
Merge pull request #1104 from ShaopengLin/Bugfix-Qt6-QVariant-TypeId
Browse files Browse the repository at this point in the history
BugFix: Compilation Failure for Qt6 Due to Deprecated Members
  • Loading branch information
kelson42 authored May 7, 2024
2 parents 904dbb4 + 086ba67 commit 851ccc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/contentmanagermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ QVariant ContentManagerModel::data(const QModelIndex& index, int role) const

r = getThumbnail(r);

if ( r.type() == QVariant::ByteArray )
if ( r.userType() == QMetaType::QByteArray )
return r;

const QString faviconUrl = r.toString();
Expand Down Expand Up @@ -136,7 +136,7 @@ void ContentManagerModel::setBooksData(const BookInfoList& data, const Downloads
// QString) from where the actual data can be obtained.
QVariant ContentManagerModel::getThumbnail(const QVariant& faviconEntry) const
{
if ( faviconEntry.type() == QVariant::ByteArray )
if ( faviconEntry.userType() == QMetaType::QByteArray )
return faviconEntry;

const auto faviconUrl = faviconEntry.toString();
Expand Down

0 comments on commit 851ccc5

Please sign in to comment.