Skip to content

Commit 7d9c4ad

Browse files
author
jef
committedNov 29, 2008
make 0.11 compile with grass 6.4
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_11_0@9719 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3e7692c commit 7d9c4ad

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
 

‎src/plugins/grass/qgsgrassplugin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,12 @@ void QgsGrassPlugin::newVector()
496496
return;
497497
}
498498

499+
#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \
500+
( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
501+
Vect_build ( &Map );
502+
#else
499503
Vect_build ( &Map, stderr );
504+
#endif
500505
Vect_set_release_support ( &Map );
501506
Vect_close ( &Map );
502507

‎src/providers/grass/qgsgrassprovider.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ extern "C" {
4646
#include <grass/gis.h>
4747
#include <grass/dbmi.h>
4848
#include <grass/Vect.h>
49+
#include <grass/version.h>
4950
}
5051

5152
#ifdef _MSC_VER
@@ -1037,7 +1038,12 @@ int QgsGrassProvider::openMap(QString gisdbase, QString location, QString mapset
10371038
if ( level == 1 )
10381039
{
10391040
QgsGrass::resetError();
1041+
#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \
1042+
( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
1043+
Vect_build ( map.map );
1044+
#else
10401045
Vect_build ( map.map, stderr );
1046+
#endif
10411047

10421048
if ( QgsGrass::getError() == QgsGrass::FATAL ) {
10431049
std::cerr << "Cannot build topology: "
@@ -1492,8 +1498,14 @@ bool QgsGrassProvider::closeEdit ( bool newMap )
14921498
// TODO: Is it necessary for build/close ?
14931499
G__setenv( (char *)"MAPSET", (char *) map->mapset.ascii() );
14941500

1501+
#if defined(GRASS_VERSION_MAJOR) && defined(GRASS_VERSION_MINOR) && \
1502+
( ( GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4 ) || GRASS_VERSION_MAJOR > 6 )
1503+
Vect_build_partial ( map->map, GV_BUILD_NONE);
1504+
Vect_build ( map->map );
1505+
#else
14951506
Vect_build_partial ( map->map, GV_BUILD_NONE, NULL);
14961507
Vect_build ( map->map, stderr );
1508+
#endif
14971509

14981510
// If a new map was created close the map and return
14991511
if ( newMap )

0 commit comments

Comments
 (0)
Please sign in to comment.