From 086ba67b93d1cd00e754bc10743ce43815dd1b9a Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Tue, 7 May 2024 11:47:47 -0400 Subject: [PATCH] Fixed compilation failure in Qt6 Replaced deprecated member type() and QVariant::Type to compatible members in both Qt5&6 --- src/contentmanagermodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contentmanagermodel.cpp b/src/contentmanagermodel.cpp index b309f66..17e3cc5 100644 --- a/src/contentmanagermodel.cpp +++ b/src/contentmanagermodel.cpp @@ -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(); @@ -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();