summaryrefslogtreecommitdiff
path: root/kde-apps/baloo-widgets/files/baloo-widgets-23.04.3-exiv2-0.28.patch
blob: c93b9637e9175fb8b58e1c9943879893e77f0ac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From a6dda3af5180d39a823224f2aca279b580ae576a Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
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