From a6dda3af5180d39a823224f2aca279b580ae576a Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Tue, 13 Jun 2023 11:13:13 +0000 Subject: [PATCH] Fix displaying image dimensions with exiv2 0.28 Accept UInt as the dimensions type BUG: 470859 (cherry picked from commit b8947e1050e25481d12e644fab02ce2df40329cf) --- src/filemetadataprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filemetadataprovider.cpp b/src/filemetadataprovider.cpp index 84a01d5..7377133 100644 --- a/src/filemetadataprovider.cpp +++ b/src/filemetadataprovider.cpp @@ -129,7 +129,7 @@ void FileMetaDataProvider::slotFileFetchFinished(KJob *job) const auto width = m_data.value(QStringLiteral("width")); const auto height = m_data.value(QStringLiteral("height")); - if ((width.type() == QVariant::Double || width.type() == QVariant::Int) && (height.type() == QVariant::Double || height.type() == QVariant::Int)) { + if (!width.isNull() && !height.isNull()) { m_data.insert(QStringLiteral("dimensions"), i18nc("width × height", "%1 × %2", width.toInt(), height.toInt())); } -- 2.41.0