Skip to content

Commit

Permalink
fix build windows build problem and some warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11794 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 11, 2009
1 parent b987041 commit e984868
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -824,7 +824,7 @@ void QgsComposerMap::drawGridAnnotations( QPainter* p, const QList< QPair< doubl
int QgsComposerMap::verticalGridLines( QList< QPair< double, QLineF > >& lines ) const
{
lines.clear();
if ( !mGridIntervalX > 0.0 )
if ( mGridIntervalX <= 0.0 )
{
return 1;
}
Expand Down Expand Up @@ -854,7 +854,7 @@ int QgsComposerMap::verticalGridLines( QList< QPair< double, QLineF > >& lines )
int QgsComposerMap::horizontalGridLines( QList< QPair< double, QLineF > >& lines ) const
{
lines.clear();
if ( !mGridIntervalY > 0.0 )
if ( mGridIntervalY <= 0.0 )
{
return 1;
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -432,7 +432,7 @@ bool QgsRasterLayer::isValidRasterFileName( QString const & theFileNameQString,
if ( myDataset == NULL )
{
if ( CPLGetLastErrorNo() != CPLE_OpenFailed )
retErrMsg = CPLGetLastErrorMsg();
retErrMsg = QString::fromUtf8( CPLGetLastErrorMsg() );
return false;
}
else if ( GDALGetRasterCount( myDataset ) == 0 )
Expand Down Expand Up @@ -1884,7 +1884,7 @@ bool QgsRasterLayer::identify( const QgsPoint& thePoint, QMap<QString, QString>&

if ( err != CPLE_None )
{
QgsLogger::warning( "RaterIO error: " + QString( CPLGetLastErrorMsg() ) );
QgsLogger::warning( "RasterIO error: " + QString::fromUtf8( CPLGetLastErrorMsg() ) );
}

double value = readValue( data, type, 0 );
Expand Down Expand Up @@ -4380,7 +4380,7 @@ void QgsRasterLayer::drawMultiBandColor( QPainter * theQPainter, QgsRasterViewPo
CPLFree( myGdalBlueData );

#ifdef QGISDEBUG
QPixmap* pm = qobject_cast<QPixmap *>( theQPainter->device() );
QPixmap *pm = dynamic_cast<QPixmap *>( theQPainter->device() );
if ( pm )
{
QgsDebugMsg( "theQPainter stats: " );
Expand Down Expand Up @@ -5070,7 +5070,7 @@ void *QgsRasterLayer::readData( GDALRasterBandH gdalBand, QgsRasterViewPort *vie
type, 0, 0 );
if ( myErr != CPLE_None )
{
QgsLogger::warning( "RaterIO error: " + QString( CPLGetLastErrorMsg() ) );
QgsLogger::warning( "RasterIO error: " + QString::fromUtf8( CPLGetLastErrorMsg() ) );
}
}
return data;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/grass/qgsgrassmodule.cpp
Expand Up @@ -563,7 +563,7 @@ void QgsGrassModuleStandardOptions::freezeOutput()
#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;

Expand Down Expand Up @@ -632,7 +632,7 @@ void QgsGrassModuleStandardOptions::thawOutput()
#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;

Expand Down
3 changes: 1 addition & 2 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -168,8 +168,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
else
{
QgsLogger::critical( "Data source is invalid" );
const char *er = CPLGetLastErrorMsg();
QgsLogger::critical( er );
QgsLogger::critical( QString::fromUtf8( CPLGetLastErrorMsg() ) );
valid = false;
}

Expand Down

0 comments on commit e984868

Please sign in to comment.