[QGIS Commit] r11794 - in trunk/qgis/src: core/composer core/raster
plugins/grass providers/ogr
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Oct 11 06:14:25 EDT 2009
Author: jef
Date: 2009-10-11 06:14:24 -0400 (Sun, 11 Oct 2009)
New Revision: 11794
Modified:
trunk/qgis/src/core/composer/qgscomposermap.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.cpp
trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
Log:
fix build windows build problem and some warnings
Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp 2009-10-10 20:08:31 UTC (rev 11793)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp 2009-10-11 10:14:24 UTC (rev 11794)
@@ -824,7 +824,7 @@
int QgsComposerMap::verticalGridLines( QList< QPair< double, QLineF > >& lines ) const
{
lines.clear();
- if ( !mGridIntervalX > 0.0 )
+ if ( mGridIntervalX <= 0.0 )
{
return 1;
}
@@ -854,7 +854,7 @@
int QgsComposerMap::horizontalGridLines( QList< QPair< double, QLineF > >& lines ) const
{
lines.clear();
- if ( !mGridIntervalY > 0.0 )
+ if ( mGridIntervalY <= 0.0 )
{
return 1;
}
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2009-10-10 20:08:31 UTC (rev 11793)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2009-10-11 10:14:24 UTC (rev 11794)
@@ -432,7 +432,7 @@
if ( myDataset == NULL )
{
if ( CPLGetLastErrorNo() != CPLE_OpenFailed )
- retErrMsg = CPLGetLastErrorMsg();
+ retErrMsg = QString::fromUtf8( CPLGetLastErrorMsg() );
return false;
}
else if ( GDALGetRasterCount( myDataset ) == 0 )
@@ -1884,7 +1884,7 @@
if ( err != CPLE_None )
{
- QgsLogger::warning( "RaterIO error: " + QString( CPLGetLastErrorMsg() ) );
+ QgsLogger::warning( "RasterIO error: " + QString::fromUtf8( CPLGetLastErrorMsg() ) );
}
double value = readValue( data, type, 0 );
@@ -4380,7 +4380,7 @@
CPLFree( myGdalBlueData );
#ifdef QGISDEBUG
- QPixmap* pm = qobject_cast<QPixmap *>( theQPainter->device() );
+ QPixmap *pm = dynamic_cast<QPixmap *>( theQPainter->device() );
if ( pm )
{
QgsDebugMsg( "theQPainter stats: " );
@@ -5070,7 +5070,7 @@
type, 0, 0 );
if ( myErr != CPLE_None )
{
- QgsLogger::warning( "RaterIO error: " + QString( CPLGetLastErrorMsg() ) );
+ QgsLogger::warning( "RasterIO error: " + QString::fromUtf8( CPLGetLastErrorMsg() ) );
}
}
return data;
Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2009-10-10 20:08:31 UTC (rev 11793)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2009-10-11 10:14:24 UTC (rev 11794)
@@ -563,7 +563,7 @@
#ifdef WIN32
for ( unsigned int i = 0; i < mItems.size(); i++ )
{
- QgsGrassModuleOption *opt = qobject_cast<QgsGrassModuleOption *>( mItems[i] );
+ QgsGrassModuleOption *opt = dynamic_cast<QgsGrassModuleOption *>( mItems[i] );
if ( !opt )
continue;
@@ -632,7 +632,7 @@
#ifdef WIN32
for ( unsigned int i = 0; i < mItems.size(); i++ )
{
- QgsGrassModuleOption *opt = qobject_cast<QgsGrassModuleOption *>( mItems[i] );
+ QgsGrassModuleOption *opt = dynamic_cast<QgsGrassModuleOption *>( mItems[i] );
if ( !opt )
continue;
Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2009-10-10 20:08:31 UTC (rev 11793)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp 2009-10-11 10:14:24 UTC (rev 11794)
@@ -168,8 +168,7 @@
else
{
QgsLogger::critical( "Data source is invalid" );
- const char *er = CPLGetLastErrorMsg();
- QgsLogger::critical( er );
+ QgsLogger::critical( QString::fromUtf8( CPLGetLastErrorMsg() ) );
valid = false;
}
More information about the QGIS-commit
mailing list