[QGIS Commit] r9291 - in trunk/qgis/src: plugins/grass
providers/grass
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Sep 10 13:21:24 EDT 2008
Author: telwertowski
Date: 2008-09-10 13:21:24 -0400 (Wed, 10 Sep 2008)
New Revision: 9291
Modified:
trunk/qgis/src/plugins/grass/qgsgrassattributes.cpp
trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
trunk/qgis/src/plugins/grass/qgsgrassplugin.h
trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
trunk/qgis/src/plugins/grass/qgsgrassselect.cpp
trunk/qgis/src/providers/grass/qgsgrass.cpp
trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
Log:
Addendum to r9288. Header adjustments for Linux and removal of const for GRASS 6.2 compatibility.
Modified: trunk/qgis/src/plugins/grass/qgsgrassattributes.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassattributes.cpp 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/plugins/grass/qgsgrassattributes.cpp 2008-09-10 17:21:24 UTC (rev 9291)
@@ -22,7 +22,7 @@
#include <QHeaderView>
#include <QKeyEvent>
-#include <QMessagebox>
+#include <QMessageBox>
#include <QSettings>
#include <QTableWidget>
Modified: trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-09-10 17:21:24 UTC (rev 9291)
@@ -1256,13 +1256,13 @@
// database path
QgsGrass::activeMode(); // because it calls private gsGrass::init()
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( mDatabaseLineEdit->text() ).toAscii() );
+ G__setenv( "GISDBASE", getShortPath( mDatabaseLineEdit->text() ).toAscii().data() );
#else
- G__setenv( "GISDBASE", mDatabaseLineEdit->text().toAscii() );
+ G__setenv( "GISDBASE", mDatabaseLineEdit->text().toAscii().data() );
#endif
QgsGrass::resetError();
- int ret = G_make_location( location.toAscii(), &mCellHead,
+ int ret = G_make_location( location.toAscii().data(), &mCellHead,
mProjInfo, mProjUnits, stdout );
if ( ret != 0 )
Modified: trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp 2008-09-10 17:21:24 UTC (rev 9291)
@@ -548,7 +548,7 @@
QgsGrass::setLocation( gisdbase, location );
struct Cell_head window;
- char *err = G__get_window( &window, "", "WIND", mapset.toLatin1().constData() );
+ char *err = G__get_window( &window, "", "WIND", mapset.toLatin1().data() );
if ( err )
{
Modified: trunk/qgis/src/plugins/grass/qgsgrassplugin.h
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassplugin.h 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/plugins/grass/qgsgrassplugin.h 2008-09-10 17:21:24 UTC (rev 9291)
@@ -29,6 +29,7 @@
class QAction;
class QIcon;
+class QPainter;
class QToolBar;
/**
Modified: trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-09-10 17:21:24 UTC (rev 9291)
@@ -165,7 +165,7 @@
}
QgsGrass::setLocation( gisdbase, location );
- char *err = G__get_window( &mWindow, "", "WIND", mapset.toLatin1() );
+ char *err = G__get_window( &mWindow, "", "WIND", mapset.toLatin1().data() );
if ( err )
{
@@ -426,7 +426,7 @@
}
QgsGrass::setLocation( QgsGrass::getDefaultGisdbase(), QgsGrass::getDefaultLocation() );
- G__setenv( "MAPSET", QgsGrass::getDefaultMapset().toLatin1() );
+ G__setenv( "MAPSET", QgsGrass::getDefaultMapset().toLatin1().data() );
if ( G_put_window( &mWindow ) == -1 )
{
Modified: trunk/qgis/src/plugins/grass/qgsgrassselect.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassselect.cpp 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/plugins/grass/qgsgrassselect.cpp 2008-09-10 17:21:24 UTC (rev 9291)
@@ -20,7 +20,7 @@
#include "qgslogger.h"
#include <QFileDialog>
-#include <QMessagebox>
+#include <QMessageBox>
#include <QSettings>
extern "C"
Modified: trunk/qgis/src/providers/grass/qgsgrass.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrass.cpp 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/providers/grass/qgsgrass.cpp 2008-09-10 17:21:24 UTC (rev 9291)
@@ -314,11 +314,11 @@
// Set principal GRASS variables (in memory)
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().constData() );
+ G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
#else
- G__setenv( "GISDBASE", gisdbase.toAscii().constData() );
+ G__setenv( "GISDBASE", gisdbase.toAscii().data() );
#endif
- G__setenv( "LOCATION_NAME", location.toAscii().constData() );
+ G__setenv( "LOCATION_NAME", location.toAscii().data() );
G__setenv( "MAPSET", "PERMANENT" ); // PERMANENT must always exist
// Add all available mapsets to search path
@@ -333,12 +333,12 @@
// Set principal GRASS variables (in memory)
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().constData() );
+ G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
#else
- G__setenv( "GISDBASE", gisdbase.toAscii().constData() );
+ G__setenv( "GISDBASE", gisdbase.toAscii().data() );
#endif
- G__setenv( "LOCATION_NAME", location.toAscii().constData() );
- G__setenv( "MAPSET", mapset.toAscii().constData() );
+ G__setenv( "LOCATION_NAME", location.toAscii().data() );
+ G__setenv( "MAPSET", mapset.toAscii().data() );
// Add all available mapsets to search path
char **ms = G_available_mapsets();
@@ -557,14 +557,14 @@
putenv( gisrcEnvChar );
// Reinitialize GRASS
- G__setenv( "GISRC", gisrcEnv.toAscii().constData() );
+ G__setenv( "GISRC", gisrcEnv.toAscii().data() );
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().constData() );
+ G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
#else
- G__setenv( "GISDBASE", gisdbase.toAscii().constData() );
+ G__setenv( "GISDBASE", gisdbase.toAscii().data() );
#endif
- G__setenv( "LOCATION_NAME", location.toAscii().constData() );
- G__setenv( "MAPSET", mapset.toAscii().constData() );
+ G__setenv( "LOCATION_NAME", location.toAscii().data() );
+ G__setenv( "MAPSET", mapset.toAscii().data() );
defaultGisdbase = gisdbase;
defaultLocation = location;
defaultMapset = mapset;
@@ -876,7 +876,7 @@
{
QgsGrass::setLocation( gisbase, location );
- if ( G__get_window( window, "", "WIND", mapset.toLocal8Bit().constData() ) )
+ if ( G__get_window( window, "", "WIND", mapset.toLocal8Bit().data() ) )
{
return false;
}
@@ -957,8 +957,8 @@
if ( type == Raster )
{
- if ( G_get_cellhd( map.toLocal8Bit().constData(),
- mapset.toLocal8Bit().constData(), window ) < 0 )
+ if ( G_get_cellhd( map.toLocal8Bit().data(),
+ mapset.toLocal8Bit().data(), window ) < 0 )
{
QMessageBox::warning( 0, QObject::tr( "Warning" ),
QObject::tr( "Cannot read raster map region" ) );
@@ -1010,8 +1010,8 @@
else if ( type == Region )
{
if ( G__get_window( window, "windows",
- map.toLocal8Bit().constData(),
- mapset.toLocal8Bit().constData() ) != NULL )
+ map.toLocal8Bit().data(),
+ mapset.toLocal8Bit().data() ) != NULL )
{
QMessageBox::warning( 0, QObject::tr( "Warning" ),
QObject::tr( "Cannot read region" ) );
Modified: trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassprovider.cpp 2008-09-10 16:30:00 UTC (rev 9290)
+++ trunk/qgis/src/providers/grass/qgsgrassprovider.cpp 2008-09-10 17:21:24 UTC (rev 9291)
@@ -985,7 +985,7 @@
QgsDebugMsg( QString( "Setting gisdbase, location: %1, %2" ).arg( gisdbase ).arg( location ) );
// Find the vector
- char *ms = G_find_vector2( mapName.toAscii().constData(), mapset.toAscii().constData() ) ;
+ char *ms = G_find_vector2( mapName.toAscii().data(), mapset.toAscii().data() ) ;
if ( ms == NULL )
{
@@ -1074,7 +1074,7 @@
// TODO: Should be done better / in other place ?
// TODO: Is it necessary for close ?
- G__setenv( "MAPSET", map->mapset.toAscii().constData() );
+ G__setenv( "MAPSET", map->mapset.toAscii().data() );
if ( closeMap ) Vect_close( map->map );
@@ -1345,7 +1345,7 @@
return false;
/* Check if current user is owner of mapset */
- if ( G__mapset_permissions2( mGisdbase.toAscii().constData(), mLocation.toAscii().constData(), mMapset.toAscii().constData() ) != 1 )
+ if ( G__mapset_permissions2( mGisdbase.toAscii().data(), mLocation.toAscii().data(), mMapset.toAscii().data() ) != 1 )
return false;
// TODO: check format? (cannot edit OGR layers)
@@ -1423,7 +1423,7 @@
// Set current mapset (mapset was previously checked by isGrassEditable() )
// TODO: Should be done better / in other place ?
- G__setenv( "MAPSET", map->mapset.toAscii().constData() );
+ G__setenv( "MAPSET", map->mapset.toAscii().data() );
Vect_close( map->map );
@@ -1499,7 +1499,7 @@
// Set current mapset (mapset was previously checked by isGrassEditable() )
// TODO: Should be done better / in other place ?
// TODO: Is it necessary for build/close ?
- G__setenv( "MAPSET", map->mapset.toAscii().constData() );
+ G__setenv( "MAPSET", map->mapset.toAscii().data() );
Vect_build_partial( map->map, GV_BUILD_NONE, NULL );
Vect_build( map->map, stderr );
More information about the QGIS-commit
mailing list