Skip to content

Commit

Permalink
fix build errors and warnings on windows (interface apparently is a k…
Browse files Browse the repository at this point in the history
…eyword in VC++)
  • Loading branch information
jef-n committed Jul 25, 2012
1 parent b64b3fc commit 269d32c
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolfreezelabels.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterdrawer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class QPainter;
class QImage;
class QgsMapToPixel;
class QgsRasterViewPort;
struct QgsRasterViewPort;
class QgsRasterIterator;

class QgsRasterDrawer
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/core/raster/qgsrasteriterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions src/core/raster/qgsrasterpipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
4 changes: 2 additions & 2 deletions src/core/raster/qgsrasterpipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/core/raster/qgsrasterresamplefilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() );
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterresamplefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class QgsRasterResampler;

class QDomElement;

class QgsRasterResampleFilter : public QgsRasterInterface
class CORE_EXPORT QgsRasterResampleFilter : public QgsRasterInterface
{
public:
QgsRasterResampleFilter( QgsRasterInterface* input = 0 );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsrasterformatsaveoptionswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 269d32c

Please sign in to comment.