[QGIS Commit] r9719 - in branches/Release-0_11_0/src: plugins/grass providers/grass

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Nov 29 13:14:35 EST 2008


Author: jef
Date: 2008-11-29 13:14:35 -0500 (Sat, 29 Nov 2008)
New Revision: 9719

Modified:
   branches/Release-0_11_0/src/plugins/grass/qgsgrassplugin.cpp
   branches/Release-0_11_0/src/providers/grass/qgsgrassprovider.cpp
Log:
make 0.11 compile with grass 6.4

Modified: branches/Release-0_11_0/src/plugins/grass/qgsgrassplugin.cpp
===================================================================
--- branches/Release-0_11_0/src/plugins/grass/qgsgrassplugin.cpp	2008-11-29 14:00:29 UTC (rev 9718)
+++ branches/Release-0_11_0/src/plugins/grass/qgsgrassplugin.cpp	2008-11-29 18:14:35 UTC (rev 9719)
@@ -496,7 +496,12 @@
     return;
   }
 
+#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \ 
+    ( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
+  Vect_build ( &Map );
+#else
   Vect_build ( &Map, stderr );
+#endif
   Vect_set_release_support ( &Map );
   Vect_close ( &Map );
 

Modified: branches/Release-0_11_0/src/providers/grass/qgsgrassprovider.cpp
===================================================================
--- branches/Release-0_11_0/src/providers/grass/qgsgrassprovider.cpp	2008-11-29 14:00:29 UTC (rev 9718)
+++ branches/Release-0_11_0/src/providers/grass/qgsgrassprovider.cpp	2008-11-29 18:14:35 UTC (rev 9719)
@@ -46,6 +46,7 @@
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 #include <grass/Vect.h>
+#include <grass/version.h>
 }
 
 #ifdef _MSC_VER
@@ -1037,7 +1038,12 @@
   if ( level == 1 )
   {
     QgsGrass::resetError();
+#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \ 
+    ( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 ) 
+    Vect_build ( map.map );
+#else
     Vect_build ( map.map, stderr );
+#endif
 
     if ( QgsGrass::getError() == QgsGrass::FATAL ) {
       std::cerr << "Cannot build topology: " 
@@ -1492,8 +1498,14 @@
   // TODO: Is it necessary for build/close ?
   G__setenv( (char *)"MAPSET", (char *) map->mapset.ascii() );
 
+#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \ 
+    ( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
+  Vect_build_partial ( map->map, GV_BUILD_NONE);
+  Vect_build ( map->map );
+#else
   Vect_build_partial ( map->map, GV_BUILD_NONE, NULL);
   Vect_build ( map->map, stderr );
+#endif
 
   // If a new map was created close the map and return
   if ( newMap )



More information about the QGIS-commit mailing list