Skip to content

Commit

Permalink
String ref qt6 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent f4d9f83 commit c1ac799
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/analysis/processing/qgsalgorithmimportphotos.cpp
Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down

0 comments on commit c1ac799

Please sign in to comment.