• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MerginMaps / input / 5983636709

26 Aug 2023 07:50AM UTC coverage: 62.064% (+1.1%) from 60.955%
5983636709

push

github

web-flow
Lcov to lnx (#2772)

move lcov to linux tests

7552 of 12168 relevant lines covered (62.06%)

102.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/inputexpressionfunctions.cpp
1
/***************************************************************************
2
 *                                                                         *
3
 *   This program is free software; you can redistribute it and/or modify  *
4
 *   it under the terms of the GNU General Public License as published by  *
5
 *   the Free Software Foundation; either version 2 of the License, or     *
6
 *   (at your option) any later version.                                   *
7
 *                                                                         *
8
 ***************************************************************************/
9

10
#include "inputexpressionfunctions.h"
11
#include "math.h"
12
#include "ios/iosutils.h"
13

14
QVariant ReadExif::func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * )
×
15
{
16
  if ( values.size() != 2 ) return QVariant();
×
17

18
  QString filepath( values.at( 0 ).toString() );
×
19
  QString exifTag( values.at( 1 ).toString() );
×
20
#ifdef ANDROID
21
  return AndroidUtils::readExif( filepath, exifTag );
22
#elif defined( Q_OS_IOS )
23
  return IosUtils::readExif( filepath, exifTag );
24
# else
25
  return QString();
×
26
#endif
27
}
×
28

29
QVariant ReadExifImgDirection::func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * )
×
30
{
31
  if ( values.size() != 1 ) return QVariant();
×
32

33
  QString filepath( values.at( 0 ).toString() );
×
34
#ifdef ANDROID
35
  QString resultString = AndroidUtils::readExif( filepath, GPS_DIRECTION_TAG );
36
  if ( resultString.isEmpty() )
37
    return QVariant();
38

39
  double resultDouble = InputUtils::convertRationalNumber( resultString );
40
  if ( isnan( resultDouble ) )
41
    return QVariant();
42

43
  return QVariant( resultDouble );
44
#elif defined( Q_OS_IOS )
45
  QString result = IosUtils::readExif( filepath, GPS_DIRECTION_TAG );
46
  return QVariant( result.toDouble() );
47
# else
48
  return QString();
×
49
#endif
50
}
×
51

52
QVariant ReadExifLatitude::func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * )
×
53
{
54
  if ( values.size() != 1 ) return QVariant();
×
55

56
  QString filepath( values.at( 0 ).toString() );
×
57
#ifdef ANDROID
58
  QString resultString = AndroidUtils::readExif( filepath, GPS_LAT_TAG );
59
  if ( resultString.isEmpty() )
60
    return QVariant();
61

62
  return QVariant( InputUtils::convertCoordinateString( resultString ) );
63
#elif defined( Q_OS_IOS )
64
  QString result = IosUtils::readExif( filepath, GPS_LAT_TAG );
65
  return QVariant( result.toDouble() );
66
# else
67
  return QString();
×
68
#endif
69
}
×
70

71
QVariant ReadExifLongitude::func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * )
×
72
{
73
  if ( values.size() != 1 ) return QVariant();
×
74

75
  QString filepath( values.at( 0 ).toString() );
×
76
#ifdef ANDROID
77
  QString resultString = AndroidUtils::readExif( filepath, GPS_LON_TAG );
78
  if ( resultString.isEmpty() )
79
    return QVariant();
80

81
  return QVariant( InputUtils::convertCoordinateString( resultString ) );
82
#elif defined( Q_OS_IOS )
83
  QString result = IosUtils::readExif( filepath, GPS_LON_TAG ) ;
84
  return QVariant( result.toDouble() );
85
# else
86
  return QString();
×
87
#endif
88
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc