Skip to content

Commit

Permalink
Merge pull request #53762 from antonio-rojas/exiv2-0.28
Browse files Browse the repository at this point in the history
Fix build with exiv2 0.28
  • Loading branch information
lbartoletti committed Jul 18, 2023
2 parents 5c0368c + 32f5418 commit 6199973
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/core/raster/qgsexiftools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ QVariant decodeXmpData( const QString &key, Exiv2::XmpData::const_iterator &it )
case Exiv2::signedLong:
case Exiv2::unsignedLongLong:
case Exiv2::signedLongLong:
#if EXIV2_TEST_VERSION (0, 28, 0)
val = QVariant::fromValue( it->toUint32() );
#else
val = QVariant::fromValue( it->toLong() );
#endif
break;

case Exiv2::tiffDouble:
Expand All @@ -80,7 +84,11 @@ QVariant decodeXmpData( const QString &key, Exiv2::XmpData::const_iterator &it )
case Exiv2::signedByte:
case Exiv2::tiffIfd:
case Exiv2::tiffIfd8:
#if EXIV2_TEST_VERSION (0, 28, 0)
val = QVariant::fromValue( static_cast< int >( it->toUint32() ) );
#else
val = QVariant::fromValue( static_cast< int >( it->toLong() ) );
#endif
break;

case Exiv2::date:
Expand Down Expand Up @@ -182,7 +190,11 @@ QVariant decodeExifData( const QString &key, Exiv2::ExifData::const_iterator &it
case Exiv2::signedLong:
case Exiv2::unsignedLongLong:
case Exiv2::signedLongLong:
#if EXIV2_TEST_VERSION (0, 28, 0)
val = QVariant::fromValue( it->toUint32() );
#else
val = QVariant::fromValue( it->toLong() );
#endif
break;

case Exiv2::tiffDouble:
Expand All @@ -196,7 +208,11 @@ QVariant decodeExifData( const QString &key, Exiv2::ExifData::const_iterator &it
case Exiv2::signedByte:
case Exiv2::tiffIfd:
case Exiv2::tiffIfd8:
#if EXIV2_TEST_VERSION (0, 28, 0)
val = QVariant::fromValue( static_cast< int >( it->toUint32() ) );
#else
val = QVariant::fromValue( static_cast< int >( it->toLong() ) );
#endif
break;

case Exiv2::date:
Expand Down

0 comments on commit 6199973

Please sign in to comment.