Skip to content

Commit 0b52a37

Browse files
committedJun 4, 2019
Disable unused code on proj 6
1 parent 87d2d9e commit 0b52a37

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
 

‎src/core/qgscoordinatereferencesystem.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,6 +2064,7 @@ long QgsCoordinateReferenceSystem::getRecordCount()
20642064
return myRecordCount;
20652065
}
20662066

2067+
#if PROJ_VERSION_MAJOR<6
20672068
// adapted from gdal/ogr/ogr_srs_dict.cpp
20682069
bool QgsCoordinateReferenceSystem::loadWkts( QHash<int, QString> &wkts, const char *filename )
20692070
{
@@ -2195,6 +2196,7 @@ bool QgsCoordinateReferenceSystem::loadIds( QHash<int, QString> &wkts )
21952196

21962197
return true;
21972198
}
2199+
#endif
21982200

21992201
int QgsCoordinateReferenceSystem::syncDatabase()
22002202
{
@@ -2750,6 +2752,7 @@ int QgsCoordinateReferenceSystem::syncDatabase()
27502752
return updated + inserted;
27512753
}
27522754

2755+
#if PROJ_VERSION_MAJOR<6
27532756
bool QgsCoordinateReferenceSystem::syncDatumTransform( const QString &dbPath )
27542757
{
27552758
const char *filename = CSVFilename( "datum_shift.csv" );
@@ -2946,6 +2949,7 @@ bool QgsCoordinateReferenceSystem::syncDatumTransform( const QString &dbPath )
29462949

29472950
return true;
29482951
}
2952+
#endif
29492953

29502954
QString QgsCoordinateReferenceSystem::geographicCrsAuthId() const
29512955
{

‎src/core/qgscoordinatereferencesystem.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,13 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
787787
*/
788788
bool loadFromDatabase( const QString &db, const QString &expression, const QString &value );
789789

790+
#if PROJ_VERSION_MAJOR<6 // not used for proj >= 6.0
790791
static bool loadIds( QHash<int, QString> &wkts );
791792
static bool loadWkts( QHash<int, QString> &wkts, const char *filename );
793+
792794
//! Update datum shift definitions from GDAL data. Used by syncDb()
793795
static bool syncDatumTransform( const QString &dbPath );
796+
#endif
794797

795798
QExplicitlySharedDataPointer<QgsCoordinateReferenceSystemPrivate> d;
796799

0 commit comments

Comments
 (0)
Please sign in to comment.