Skip to content
Permalink
Browse files

GRASS 7.0.0 API change

  • Loading branch information
blazek committed Mar 12, 2015
1 parent 4f36b65 commit 8a43e909a8bd698f6f24a96dcc20162318186af5
Showing with 11 additions and 10 deletions.
  1. +0 −9 src/providers/grass/qgsgrass.cpp
  2. +11 −1 src/providers/grass/qgsgrass.h
@@ -50,15 +50,6 @@ extern "C"
#endif
}

#if GRASS_VERSION_MAJOR >= 7
#define G_suppress_masking Rast_suppress_masking
#define BOUND_BOX bound_box
#endif

#if GRASS_VERSION_MAJOR > 7 || (GRASS_VERSION_MAJOR == 7 && GRASS_VERSION_MINOR >= 1)
#define G_available_mapsets G_get_available_mapsets
#endif

#if !defined(GRASS_VERSION_MAJOR) || \
!defined(GRASS_VERSION_MINOR) || \
GRASS_VERSION_MAJOR<6 || \
@@ -42,13 +42,23 @@ class QgsRectangle;
#define EXPAND(x) STR(x)
#define GRASS_VERSION_RELEASE_STRING EXPAND( GRASS_VERSION_RELEASE )

#if (GRASS_VERSION_MAJOR < 7) || (GRASS_VERSION_MAJOR == 7 && GRASS_VERSION_MINOR == 0)
#if (GRASS_VERSION_MAJOR < 7)
#define G_TRY try { if( !setjmp( QgsGrass::jumper ) )
#else
#define G_TRY try { if( !setjmp(*G_fatal_longjmp(1)) )
#endif
#define G_CATCH else { throw QgsGrass::Exception( QgsGrass::errorMessage() ); } } catch

#if GRASS_VERSION_MAJOR >= 7
#define G_available_mapsets G_get_available_mapsets
#define G__mapset_permissions2 G_mapset_permissions2
#define G_suppress_masking Rast_suppress_masking
#define G__get_window G_get_element_window
#define G__getenv G_getenv_nofatal
#define G__setenv G_setenv_nogisrc
#define BOUND_BOX bound_box
#endif

/*!
Methods for C library initialization and error handling.
*/

0 comments on commit 8a43e90

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