[QGIS Commit] r9292 - in trunk/qgis/src: core/composer
plugins/grass providers/grass
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Sep 10 15:35:48 EDT 2008
Author: jef
Date: 2008-09-10 15:35:48 -0400 (Wed, 10 Sep 2008)
New Revision: 9292
Modified:
trunk/qgis/src/core/composer/qgslegendmodel.cpp
trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp
trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp
trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
trunk/qgis/src/providers/grass/qgsgrass.cpp
trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
Log:
fix gcc 4.3 warnings
Modified: trunk/qgis/src/core/composer/qgslegendmodel.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgslegendmodel.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/core/composer/qgslegendmodel.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -125,8 +125,6 @@
const QList<QgsSymbol*> vectorSymbols = vectorRenderer->symbols();
QList<QgsSymbol*>::const_iterator symbolIt = vectorSymbols.constBegin();
- QStandardItem* currentSymbolItem = 0;
-
for ( ; symbolIt != vectorSymbols.constEnd(); ++symbolIt )
{
if ( !( *symbolIt ) )
Modified: trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedit.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/plugins/grass/qgsgrassedit.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -649,6 +649,7 @@
QTableWidgetItem *ti = mAttributeTable->item( row, 2 );
if ( ti )
+ {
if ( mAttributeTable->item( row, 1 )->text().compare( "varchar" ) == 0 )
{
ti->setFlags( ti->flags() | Qt::ItemIsEnabled );
@@ -657,6 +658,7 @@
{
ti->setFlags( ti->flags() & ~Qt::ItemIsEnabled );
}
+ }
}
void QgsGrassEdit::alterTable( void )
Modified: trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -219,6 +219,10 @@
}
Vect_reset_line( e->mEditPoints );
break;
+
+ default:
+ // ignore others
+ break;
}
if ( e->mEditPoints->n_points == 0 )
@@ -324,7 +328,8 @@
e->setCanvasPropmt( QObject::tr( "Select vertex" ), "", "" );
break;
- case Qt::MidButton:
+ default:
+ // ignore others
break;
}
@@ -466,7 +471,8 @@
e->setCanvasPropmt( QObject::tr( "Select line segment" ), "", "" );
break;
- case Qt::MidButton:
+ default:
+ // ignore others
break;
}
@@ -595,7 +601,8 @@
e->setCanvasPropmt( QObject::tr( "Select vertex" ), "", "" );
break;
- case Qt::MidButton:
+ default:
+ // ignore others
break;
}
}
@@ -668,7 +675,8 @@
e->setCanvasPropmt( QObject::tr( "Select element" ), "", "" );
break;
- case Qt::MidButton:
+ default:
+ // ignore others
break;
}
}
@@ -750,7 +758,8 @@
e->setCanvasPropmt( QObject::tr( "Select element" ), "", "" );
break;
- case Qt::MidButton:
+ default:
+ // ignore others
break;
}
}
@@ -844,7 +853,8 @@
e->setCanvasPropmt( QObject::tr( "Select point on line" ), "", "" );
break;
- case Qt::MidButton:
+ default:
+ // ignore others
break;
}
}
Modified: trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/plugins/grass/qgsgrassmapcalc.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -24,7 +24,8 @@
#include "qgsmaplayer.h"
#include "qgsgrassplugin.h"
-#include <math.h>
+#include <cmath>
+#include <typeinfo>
#include <QDir>
#include <QDomDocument>
Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -31,6 +31,7 @@
#include "qgsmaplayer.h"
#include "qgsvectorlayer.h"
+#include <typeinfo>
#include <QComboBox>
#include <QDomDocument>
#include <QFileDialog>
Modified: trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/plugins/grass/qgsgrassnewmapset.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -1256,9 +1256,9 @@
// database path
QgsGrass::activeMode(); // because it calls private gsGrass::init()
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( mDatabaseLineEdit->text() ).toAscii().data() );
+ G__setenv( (char *) "GISDBASE", getShortPath( mDatabaseLineEdit->text() ).toAscii().data() );
#else
- G__setenv( "GISDBASE", mDatabaseLineEdit->text().toAscii().data() );
+ G__setenv( (char *) "GISDBASE", mDatabaseLineEdit->text().toAscii().data() );
#endif
QgsGrass::resetError();
Modified: trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/plugins/grass/qgsgrassplugin.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -548,7 +548,7 @@
QgsGrass::setLocation( gisdbase, location );
struct Cell_head window;
- char *err = G__get_window( &window, "", "WIND", mapset.toLatin1().data() );
+ char *err = G__get_window( &window, (char *) "", (char *) "WIND", mapset.toLatin1().data() );
if ( err )
{
Modified: trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -165,7 +165,7 @@
}
QgsGrass::setLocation( gisdbase, location );
- char *err = G__get_window( &mWindow, "", "WIND", mapset.toLatin1().data() );
+ char *err = G__get_window( &mWindow, (char *) "", (char *) "WIND", mapset.toLatin1().data() );
if ( err )
{
@@ -426,7 +426,7 @@
}
QgsGrass::setLocation( QgsGrass::getDefaultGisdbase(), QgsGrass::getDefaultLocation() );
- G__setenv( "MAPSET", QgsGrass::getDefaultMapset().toLatin1().data() );
+ G__setenv( (char *) "MAPSET", QgsGrass::getDefaultMapset().toLatin1().data() );
if ( G_put_window( &mWindow ) == -1 )
{
Modified: trunk/qgis/src/providers/grass/qgsgrass.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrass.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/providers/grass/qgsgrass.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -314,12 +314,12 @@
// Set principal GRASS variables (in memory)
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
+ G__setenv( (char *) "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
#else
- G__setenv( "GISDBASE", gisdbase.toAscii().data() );
+ G__setenv( (char *) "GISDBASE", gisdbase.toAscii().data() );
#endif
- G__setenv( "LOCATION_NAME", location.toAscii().data() );
- G__setenv( "MAPSET", "PERMANENT" ); // PERMANENT must always exist
+ G__setenv( (char *) "LOCATION_NAME", location.toAscii().data() );
+ G__setenv( (char *) "MAPSET", (char *) "PERMANENT" ); // PERMANENT must always exist
// Add all available mapsets to search path
char **ms = G_available_mapsets();
@@ -333,12 +333,12 @@
// Set principal GRASS variables (in memory)
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
+ G__setenv( (char *) "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
#else
- G__setenv( "GISDBASE", gisdbase.toAscii().data() );
+ G__setenv( (char *) "GISDBASE", gisdbase.toAscii().data() );
#endif
- G__setenv( "LOCATION_NAME", location.toAscii().data() );
- G__setenv( "MAPSET", mapset.toAscii().data() );
+ G__setenv( (char *) "LOCATION_NAME", location.toAscii().data() );
+ G__setenv( (char *) "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().data() );
+ G__setenv( (char *) "GISRC", gisrcEnv.toAscii().data() );
#if defined(WIN32)
- G__setenv( "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
+ G__setenv( (char *) "GISDBASE", getShortPath( gisdbase ).toAscii().data() );
#else
- G__setenv( "GISDBASE", gisdbase.toAscii().data() );
+ G__setenv( (char *) "GISDBASE", gisdbase.toAscii().data() );
#endif
- G__setenv( "LOCATION_NAME", location.toAscii().data() );
- G__setenv( "MAPSET", mapset.toAscii().data() );
+ G__setenv( (char *) "LOCATION_NAME", location.toAscii().data() );
+ G__setenv( (char *) "MAPSET", mapset.toAscii().data() );
defaultGisdbase = gisdbase;
defaultLocation = location;
defaultMapset = mapset;
@@ -596,13 +596,13 @@
}
mMapsetLock = "";
- putenv( "GISRC" );
+ putenv( (char *) "GISRC" );
// Reinitialize GRASS
- G__setenv( "GISRC", "" );
- G__setenv( "GISDBASE", "" );
- G__setenv( "LOCATION_NAME", "" );
- G__setenv( "MAPSET", "" );
+ G__setenv( (char *) "GISRC", (char *) "" );
+ G__setenv( (char *) "GISDBASE", (char *) "" );
+ G__setenv( (char *) "LOCATION_NAME", (char *) "" );
+ G__setenv( (char *) "MAPSET", (char *) "" );
defaultGisdbase = "";
defaultLocation = "";
defaultMapset = "";
@@ -876,7 +876,7 @@
{
QgsGrass::setLocation( gisbase, location );
- if ( G__get_window( window, "", "WIND", mapset.toLocal8Bit().data() ) )
+ if ( G__get_window( window, (char *) "", (char *) "WIND", mapset.toLocal8Bit().data() ) )
{
return false;
}
@@ -1009,7 +1009,7 @@
}
else if ( type == Region )
{
- if ( G__get_window( window, "windows",
+ if ( G__get_window( window, (char *) "windows",
map.toLocal8Bit().data(),
mapset.toLocal8Bit().data() ) != NULL )
{
Modified: trunk/qgis/src/providers/grass/qgsgrassprovider.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassprovider.cpp 2008-09-10 17:21:24 UTC (rev 9291)
+++ trunk/qgis/src/providers/grass/qgsgrassprovider.cpp 2008-09-10 19:35:48 UTC (rev 9292)
@@ -730,7 +730,7 @@
QgsDebugMsg( "Database opened -> open select cursor" );
dbString dbstr;
db_init_string( &dbstr );
- db_set_string( &dbstr, "select * from " );
+ db_set_string( &dbstr, (char *)"select * from " );
db_append_string( &dbstr, layer.fieldInfo->table );
QgsDebugMsg( QString( "SQL: %1" ).arg( db_get_string( &dbstr ) ) );
@@ -1074,7 +1074,7 @@
// TODO: Should be done better / in other place ?
// TODO: Is it necessary for close ?
- G__setenv( "MAPSET", map->mapset.toAscii().data() );
+ G__setenv( (char *)"MAPSET", map->mapset.toAscii().data() );
if ( closeMap ) Vect_close( map->map );
@@ -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().data() );
+ G__setenv( (char *)"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().data() );
+ G__setenv( (char *) "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