Skip to content
Permalink
Browse files

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)
  • Loading branch information
swiss-knight authored and nyalldawson committed Nov 26, 2018
1 parent c2f16cf commit b5ad33f6390f183487bf9736cd04b80aefaa602f
@@ -349,6 +349,9 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#ifdef PROJ_HAS_INFO
#include <proj.h>
#endif
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#include <proj_api.h>

//
@@ -40,6 +40,9 @@
//proj4 includes
extern "C"
{
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#include <proj_api.h>
}

@@ -38,6 +38,9 @@
#include "qgssettings.h"

#include <sqlite3.h>
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#include <proj_api.h>

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


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

@@ -34,6 +34,9 @@

extern "C"
{
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#include <proj_api.h>
}
#include <sqlite3.h>
@@ -21,6 +21,9 @@

extern "C"
{
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#include <proj_api.h>
}
#include <sqlite3.h>
@@ -122,12 +122,15 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
bool QgsMacNative::hasDarkTheme()
{
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_14
if ([NSApp respondsToSelector:@selector(effectiveAppearance)]) {
if ( [NSApp respondsToSelector:@selector( effectiveAppearance )] )
{
// compiled on macos 10.14+ AND running on macos 10.14+
// check the settings of effective appearance of the user
NSAppearanceName appearanceName = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
return ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]);
} else {
return ( [appearanceName isEqualToString:NSAppearanceNameDarkAqua] );
}
else
{
// compiled on macos 10.14+ BUT running on macos 10.13-
// DarkTheme was introduced in MacOS 10.14, fallback to light theme
return false;
@@ -24,6 +24,9 @@ Email : sherman at mrcc dot com
#include "qgsvectorlayer.h"
#include "qgsproject.h"

#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#include <proj_api.h>
#include <gdal.h>
#include <cpl_conv.h>

0 comments on commit b5ad33f

Please sign in to comment.
You can’t perform that action at this time.