Skip to content
Permalink
Browse files
String ref qt6 fixes
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent f4d9f83 commit c1ac799076e3f027981f7e293c7b69b1513d78ed
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/analysis/processing/qgsalgorithmimportphotos.cpp
@@ -97,9 +97,16 @@ bool QgsImportPhotosAlgorithm::extractGeoTagFromMetadata( const QVariantMap &met
if ( !ok )
return false;

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if ( metadata.value( QStringLiteral( "EXIF_GPSLongitudeRef" ) ).toString().rightRef( 1 ).compare( QLatin1String( "W" ), Qt::CaseInsensitive ) == 0
|| metadata.value( QStringLiteral( "EXIF_GPSLongitudeRef" ) ).toDouble() < 0 )
#else
if ( QStringView { metadata.value( QStringLiteral( "EXIF_GPSLongitudeRef" ) ).toString() }.right( 1 ).compare( QLatin1String( "W" ), Qt::CaseInsensitive ) == 0
|| metadata.value( QStringLiteral( "EXIF_GPSLongitudeRef" ) ).toDouble() < 0 )
#endif
{
x = -x;
}
}
else
{
@@ -114,9 +121,16 @@ bool QgsImportPhotosAlgorithm::extractGeoTagFromMetadata( const QVariantMap &met
if ( !ok )
return false;

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if ( metadata.value( QStringLiteral( "EXIF_GPSLatitudeRef" ) ).toString().rightRef( 1 ).compare( QLatin1String( "S" ), Qt::CaseInsensitive ) == 0
|| metadata.value( QStringLiteral( "EXIF_GPSLatitudeRef" ) ).toDouble() < 0 )
#else
if ( QStringView { metadata.value( QStringLiteral( "EXIF_GPSLatitudeRef" ) ).toString() }.right( 1 ).compare( QLatin1String( "S" ), Qt::CaseInsensitive ) == 0
|| metadata.value( QStringLiteral( "EXIF_GPSLatitudeRef" ) ).toDouble() < 0 )
#endif
{
y = -y;
}
}
else
{

0 comments on commit c1ac799

Please sign in to comment.