Skip to content

Commit f1b09b5

Browse files
author
g_j_m
committedFeb 18, 2007
Fix some more compiler warnings. Apply -Werror to grass directories.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6627 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 535f69a commit f1b09b5

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed
 

‎src/plugins/grass/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ SUBDIRS(config modules themes)
33

44
ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
55
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
6-
MESSAGE("plugins/grass : -Werror removed for this directory for now - please get rid of all warnings!")
7-
REMOVE_DEFINITIONS( -Werror )
86

97
########################################################
108
# Files

‎src/plugins/grass/qgsgrassnewmapset.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/***************************************************************************
23
qgsgrassnewmapset.cpp - New GRASS mapset wizard
34
-------------------
@@ -61,6 +62,11 @@
6162

6263
// For bug in GPJ_osr_to_grass()
6364
#include "grass/version.h"
65+
// Prevents some compiler warnings from the version.h include
66+
QString temp1(GRASS_VERSION_STRING);
67+
QString temp2(GRASS_VERSION_MAJOR);
68+
QString temp3(GRASS_VERSION_MINOR);
69+
QString temp4(GRASS_VERSION_RELEASE);
6470

6571
bool QgsGrassNewMapset::mRunning = false;
6672

‎src/providers/grass/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11

22
ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
3-
MESSAGE("providers/grass : -Werror removed for this directory for now - please get rid of all warnings!")
4-
REMOVE_DEFINITIONS( -Werror )
53

64
########################################################
75
# Files

‎src/providers/grass/qgsgrass.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,14 @@ int QgsGrass::versionMinor()
987987
{
988988
return QString(GRASS_VERSION_MINOR).toInt();
989989
}
990+
int QgsGrass::versionRelease()
991+
{
992+
return QString(GRASS_VERSION_RELEASE).toInt();
993+
}
994+
QString QgsGrass::versionString()
995+
{
996+
return QString(GRASS_VERSION_STRING);
997+
}
990998

991999
bool QgsGrass::isMapset ( QString path )
9921000
{

‎src/providers/grass/qgsgrass.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ class QgsGrass {
149149
//! Library version
150150
static int versionMajor();
151151
static int versionMinor();
152+
static int versionRelease();
153+
static QString versionString();
152154

153155
private:
154156
static int initialized; // Set to 1 after initialization

0 commit comments

Comments
 (0)