Skip to content

Commit 2751eef

Browse files
author
jef
committed
fix build windows build problem and some warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk@11794 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f7d22f0 commit 2751eef

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

src/core/composer/qgscomposermap.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ void QgsComposerMap::drawGridAnnotations( QPainter* p, const QList< QPair< doubl
824824
int QgsComposerMap::verticalGridLines( QList< QPair< double, QLineF > >& lines ) const
825825
{
826826
lines.clear();
827-
if ( !mGridIntervalX > 0.0 )
827+
if ( mGridIntervalX <= 0.0 )
828828
{
829829
return 1;
830830
}
@@ -854,7 +854,7 @@ int QgsComposerMap::verticalGridLines( QList< QPair< double, QLineF > >& lines )
854854
int QgsComposerMap::horizontalGridLines( QList< QPair< double, QLineF > >& lines ) const
855855
{
856856
lines.clear();
857-
if ( !mGridIntervalY > 0.0 )
857+
if ( mGridIntervalY <= 0.0 )
858858
{
859859
return 1;
860860
}

src/core/raster/qgsrasterlayer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ bool QgsRasterLayer::isValidRasterFileName( QString const & theFileNameQString,
432432
if ( myDataset == NULL )
433433
{
434434
if ( CPLGetLastErrorNo() != CPLE_OpenFailed )
435-
retErrMsg = CPLGetLastErrorMsg();
435+
retErrMsg = QString::fromUtf8( CPLGetLastErrorMsg() );
436436
return false;
437437
}
438438
else if ( GDALGetRasterCount( myDataset ) == 0 )
@@ -1884,7 +1884,7 @@ bool QgsRasterLayer::identify( const QgsPoint& thePoint, QMap<QString, QString>&
18841884

18851885
if ( err != CPLE_None )
18861886
{
1887-
QgsLogger::warning( "RaterIO error: " + QString( CPLGetLastErrorMsg() ) );
1887+
QgsLogger::warning( "RasterIO error: " + QString::fromUtf8( CPLGetLastErrorMsg() ) );
18881888
}
18891889

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

43824382
#ifdef QGISDEBUG
4383-
QPixmap* pm = qobject_cast<QPixmap *>( theQPainter->device() );
4383+
QPixmap *pm = dynamic_cast<QPixmap *>( theQPainter->device() );
43844384
if ( pm )
43854385
{
43864386
QgsDebugMsg( "theQPainter stats: " );
@@ -5070,7 +5070,7 @@ void *QgsRasterLayer::readData( GDALRasterBandH gdalBand, QgsRasterViewPort *vie
50705070
type, 0, 0 );
50715071
if ( myErr != CPLE_None )
50725072
{
5073-
QgsLogger::warning( "RaterIO error: " + QString( CPLGetLastErrorMsg() ) );
5073+
QgsLogger::warning( "RasterIO error: " + QString::fromUtf8( CPLGetLastErrorMsg() ) );
50745074
}
50755075
}
50765076
return data;

src/plugins/grass/qgsgrassmodule.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ void QgsGrassModuleStandardOptions::freezeOutput()
563563
#ifdef WIN32
564564
for ( unsigned int i = 0; i < mItems.size(); i++ )
565565
{
566-
QgsGrassModuleOption *opt = qobject_cast<QgsGrassModuleOption *>( mItems[i] );
566+
QgsGrassModuleOption *opt = dynamic_cast<QgsGrassModuleOption *>( mItems[i] );
567567
if ( !opt )
568568
continue;
569569

@@ -632,7 +632,7 @@ void QgsGrassModuleStandardOptions::thawOutput()
632632
#ifdef WIN32
633633
for ( unsigned int i = 0; i < mItems.size(); i++ )
634634
{
635-
QgsGrassModuleOption *opt = qobject_cast<QgsGrassModuleOption *>( mItems[i] );
635+
QgsGrassModuleOption *opt = dynamic_cast<QgsGrassModuleOption *>( mItems[i] );
636636
if ( !opt )
637637
continue;
638638

src/providers/ogr/qgsogrprovider.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
168168
else
169169
{
170170
QgsLogger::critical( "Data source is invalid" );
171-
const char *er = CPLGetLastErrorMsg();
172-
QgsLogger::critical( er );
171+
QgsLogger::critical( QString::fromUtf8( CPLGetLastErrorMsg() ) );
173172
valid = false;
174173
}
175174

0 commit comments

Comments
 (0)