Skip to content

Commit b5ad33f

Browse files
swiss-knightnyalldawson
authored andcommittedNov 26, 2018
Add ACCEPT_USE_OF_DEPRECATED_PROJ_API_H macro for proj_api.h to work with new release of proj4.
(cherry picked from commit 6a7e951)
1 parent c2f16cf commit b5ad33f

File tree

7 files changed

+25
-3
lines changed

7 files changed

+25
-3
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
349349
#ifdef PROJ_HAS_INFO
350350
#include <proj.h>
351351
#endif
352+
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
353+
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
354+
#endif
352355
#include <proj_api.h>
353356

354357
//

‎src/app/qgscustomprojectiondialog.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
//proj4 includes
4141
extern "C"
4242
{
43+
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
44+
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
45+
#endif
4346
#include <proj_api.h>
4447
}
4548

‎src/core/qgscoordinatereferencesystem.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
#include "qgssettings.h"
3939

4040
#include <sqlite3.h>
41+
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
42+
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
43+
#endif
4144
#include <proj_api.h>
4245

4346
//gdal and ogr includes (needed for == operator)
@@ -46,6 +49,7 @@
4649
#include <cpl_conv.h>
4750
#include <cpl_csv.h>
4851

52+
4953
//! The length of the string "+lat_1="
5054
const int LAT_PREFIX_LEN = 7;
5155

‎src/core/qgscoordinatetransform.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434

3535
extern "C"
3636
{
37+
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
38+
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
39+
#endif
3740
#include <proj_api.h>
3841
}
3942
#include <sqlite3.h>

‎src/core/qgscoordinatetransform_p.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121

2222
extern "C"
2323
{
24+
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
25+
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
26+
#endif
2427
#include <proj_api.h>
2528
}
2629
#include <sqlite3.h>

‎src/native/mac/qgsmacnative.mm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,15 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
122122
bool QgsMacNative::hasDarkTheme()
123123
{
124124
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_14
125-
if ([NSApp respondsToSelector:@selector(effectiveAppearance)]) {
125+
if ( [NSApp respondsToSelector:@selector( effectiveAppearance )] )
126+
{
126127
// compiled on macos 10.14+ AND running on macos 10.14+
127128
// check the settings of effective appearance of the user
128129
NSAppearanceName appearanceName = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
129-
return ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]);
130-
} else {
130+
return ( [appearanceName isEqualToString:NSAppearanceNameDarkAqua] );
131+
}
132+
else
133+
{
131134
// compiled on macos 10.14+ BUT running on macos 10.13-
132135
// DarkTheme was introduced in MacOS 10.14, fallback to light theme
133136
return false;

‎tests/src/core/testqgscoordinatereferencesystem.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Email : sherman at mrcc dot com
2424
#include "qgsvectorlayer.h"
2525
#include "qgsproject.h"
2626

27+
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
28+
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
29+
#endif
2730
#include <proj_api.h>
2831
#include <gdal.h>
2932
#include <cpl_conv.h>

0 commit comments

Comments
 (0)
Please sign in to comment.