Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Astyle
  • Loading branch information
nyalldawson committed Nov 26, 2018
1 parent 6a7e951 commit 46a8390
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -346,7 +346,7 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#endif
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#endif
#include <proj_api.h>

//
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgscustomprojectiondialog.cpp
Expand Up @@ -42,7 +42,7 @@ extern "C"
{
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#endif
#include <proj_api.h>
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatetransform_p.cpp
Expand Up @@ -23,7 +23,7 @@ extern "C"
{
#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
#endif
#endif
#include <proj_api.h>
}
#include <sqlite3.h>
Expand Down
9 changes: 6 additions & 3 deletions src/native/mac/qgsmacnative.mm
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgscoordinatereferencesystem.cpp
Expand Up @@ -26,7 +26,7 @@ Email : sherman at mrcc dot com

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

0 comments on commit 46a8390

Please sign in to comment.