Skip to content
Permalink
Browse files

fix build errors and warnings on windows (interface apparently is a k…

…eyword in VC++)
  • Loading branch information
jef-n committed Jul 25, 2012
1 parent b64b3fc commit 269d32c82d9fff220e495e5525a070d17094b52b
@@ -24,7 +24,7 @@
#include "qgscoordinatetransform.h"

class QgsHighlight;
class QgsLabelPosition;
struct QgsLabelPosition;

/**A map tool for freezing (writing to attribute table) and thawing label positions and rotation*/
class QgsMapToolFreezeLabels: public QgsMapToolLabel
@@ -1566,12 +1566,12 @@ void QgsRasterLayerProperties::updatePipeItems()
for ( int i = 0; i < pipe->size(); i++ )
{
if ( i >= mPipeTreeWidget->topLevelItemCount() ) break;
QgsRasterInterface * interface = pipe->at( i );
QTreeWidgetItem *item = mPipeTreeWidget->topLevelItem( i );
if ( !item ) continue;
// Checkboxes disabled for now, see above
#if 0
bool on = interface->on();
QgsRasterInterface * iface = pipe->at( i );
bool on = iface->on();
Qt::ItemFlags flags = item->flags();
if ( pipe->canSetOn( i, !on ) )
{
@@ -24,7 +24,7 @@
class QPainter;
class QImage;
class QgsMapToPixel;
class QgsRasterViewPort;
struct QgsRasterViewPort;
class QgsRasterIterator;

class QgsRasterDrawer
@@ -188,7 +188,7 @@ QgsRasterFileWriter::WriterError QgsRasterFileWriter::writeImageRaster( QgsRaste
void* blueData = VSIMalloc( mMaxTileWidth * mMaxTileHeight );
void* alphaData = VSIMalloc( mMaxTileWidth * mMaxTileHeight );
QgsRectangle mapRect;
int iterLeft, iterTop, iterCols, iterRows;
int iterLeft = 0, iterTop = 0, iterCols = 0, iterRows = 0;
int fileIndex = 0;

//create destProvider for whole dataset here
@@ -7,9 +7,9 @@
class QgsMapToPixel;
class QgsRasterInterface;
class QgsRasterProjector;
class QgsRasterViewPort;
struct QgsRasterViewPort;

class QgsRasterIterator
class CORE_EXPORT QgsRasterIterator
{
public:
//Stores information about reading of a raster band. Columns and rows are in unsampled coordinates
@@ -174,34 +174,34 @@ bool QgsRasterPipe::set( QgsRasterInterface* theInterface )
return insert( idx, theInterface ); // insert may still fail and return false
}

QgsRasterInterface * QgsRasterPipe::interface( Role role ) const
QgsRasterInterface * QgsRasterPipe::iface( Role role ) const
{
QgsDebugMsg( QString( "role = %1" ).arg( role ) );
if ( mRoleMap.contains( role ) )
{
QgsDebugMsg( QString( "role = %1" ).arg( role ) );
if ( mRoleMap.contains( role ) )
{
return mInterfaces.value( mRoleMap.value( role ) );
}
return 0;
return mInterfaces.value( mRoleMap.value( role ) );
}
return 0;
}

QgsRasterDataProvider * QgsRasterPipe::provider() const
{
return dynamic_cast<QgsRasterDataProvider *>( interface( ProviderRole ) );
return dynamic_cast<QgsRasterDataProvider *>( iface( ProviderRole ) );
}

QgsRasterRenderer * QgsRasterPipe::renderer() const
{
return dynamic_cast<QgsRasterRenderer *>( interface( RendererRole ) );
return dynamic_cast<QgsRasterRenderer *>( iface( RendererRole ) );
}

QgsRasterResampleFilter * QgsRasterPipe::resampleFilter() const
{
return dynamic_cast<QgsRasterResampleFilter *>( interface( ResamplerRole ) );
return dynamic_cast<QgsRasterResampleFilter *>( iface( ResamplerRole ) );
}

QgsRasterProjector * QgsRasterPipe::projector() const
{
return dynamic_cast<QgsRasterProjector*>( interface( ProjectorRole ) );
return dynamic_cast<QgsRasterProjector*>( iface( ProjectorRole ) );
}

bool QgsRasterPipe::remove( int idx )
@@ -69,7 +69,7 @@ class CORE_EXPORT QgsRasterPipe
bool set( QgsRasterInterface * theInterface );

/** Get known interface by role */
QgsRasterInterface * interface( Role role ) const;
QgsRasterInterface * iface( Role role ) const;

/** Remove and delete interface at given index if possible */
bool remove( int idx );
@@ -99,7 +99,7 @@ class CORE_EXPORT QgsRasterPipe

private:
/** Get known parent type_info of interface parent */
Role interfaceRole( QgsRasterInterface * interface ) const;
Role interfaceRole( QgsRasterInterface * iface ) const;

// Interfaces in pipe, the first is always provider
QVector<QgsRasterInterface*> mInterfaces;
@@ -90,8 +90,8 @@ bool QgsRasterResampleFilter::setInput( QgsRasterInterface* input )

if ( input->dataType( 1 ) != QgsRasterInterface::ARGB32_Premultiplied )
{
return false;
QgsDebugMsg( "Unknown input data type" );
return false;
}

mInput = input;
@@ -191,7 +191,7 @@ void QgsRasterResampleFilter::writeXML( QDomDocument& doc, QDomElement& parentEl

QDomElement rasterRendererElem = doc.createElement( "rasterresampler" );

rasterRendererElem.setAttribute( "maxOversampling", mMaxOversampling );
rasterRendererElem.setAttribute( "maxOversampling", QString::number( mMaxOversampling ) );
if ( mZoomedInResampler )
{
rasterRendererElem.setAttribute( "zoomedInResampler", mZoomedInResampler->type() );
@@ -25,7 +25,7 @@ class QgsRasterResampler;

class QDomElement;

class QgsRasterResampleFilter : public QgsRasterInterface
class CORE_EXPORT QgsRasterResampleFilter : public QgsRasterInterface
{
public:
QgsRasterResampleFilter( QgsRasterInterface* input = 0 );
@@ -262,7 +262,7 @@ bool QgsRasterFormatSaveOptionsWidget::validateOptions( bool gui )
{
// print error string?
char** papszOptions = papszFromStringList( createOptions );
ok = ( GDALValidateCreationOptions( myGdalDriver, papszOptions ) == TRUE );
ok = GDALValidateCreationOptions( myGdalDriver, papszOptions );
CSLDestroy( papszOptions );
if ( gui )
{

0 comments on commit 269d32c

Please sign in to comment.
You can’t perform that action at this time.