Skip to content

Commit

Permalink
fix typos and some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 23, 2012
1 parent 4be392a commit 15b46e6
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions scripts/spelling.dat
Expand Up @@ -456,3 +456,4 @@ writeable:writable
vaild:valid vaild:valid
opps:oops opps:oops
arount:around arount:around
acheive:achieve
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -2409,7 +2409,7 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS


} }


// make sure at least one layer was succesfully added // make sure at least one layer was successfully added
if ( myList.count() == 0 ) if ( myList.count() == 0 )
{ {
return false; return false;
Expand Down Expand Up @@ -7360,7 +7360,7 @@ bool QgisApp::addRasterLayers( QStringList const &theFileNameQStringList, bool g
else else
{ {
// Issue message box warning unless we are loading from cmd line since // Issue message box warning unless we are loading from cmd line since
// non-rasters are passed to this function first and then sucessfully // non-rasters are passed to this function first and then successfully
// loaded afterwards (see main.cpp) // loaded afterwards (see main.cpp)


if ( guiWarning ) if ( guiWarning )
Expand Down
1 change: 0 additions & 1 deletion src/core/qgsmaprenderer.cpp
Expand Up @@ -504,7 +504,6 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
mRenderContext.painter()->scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor ); mRenderContext.painter()->scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor );
} }



if ( !ml->draw( mRenderContext ) ) if ( !ml->draw( mRenderContext ) )
{ {
emit drawError( ml ); emit drawError( ml );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrasterdataprovider.h
Expand Up @@ -526,7 +526,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast
} }


/** Set no data value on created dataset */ /** Set no data value on created dataset */
virtual bool setNoDataValue( int bandNo, double noDataValue ) { return false; } virtual bool setNoDataValue( int, double ) { return false; }


/**Returns the formats supported by create()*/ /**Returns the formats supported by create()*/
virtual QStringList createFormats() const { return QStringList(); } virtual QStringList createFormats() const { return QStringList(); }
Expand Down
2 changes: 2 additions & 0 deletions src/core/raster/qgsrasterfilewriter.cpp
Expand Up @@ -261,6 +261,8 @@ QgsRasterFileWriter::WriterError QgsRasterFileWriter::writeDataRaster(
QgsRasterDataProvider* destProvider, QgsRasterDataProvider* destProvider,
QProgressDialog* progressDialog ) QProgressDialog* progressDialog )
{ {
Q_UNUSED( pipe );
Q_UNUSED( destHasNoDataValueList );
QgsDebugMsg( "Entered" ); QgsDebugMsg( "Entered" );


const QgsRasterInterface* iface = iter->input(); const QgsRasterInterface* iface = iter->input();
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterfilewriter.h
Expand Up @@ -44,7 +44,7 @@ class CORE_EXPORT QgsRasterFileWriter
~QgsRasterFileWriter(); ~QgsRasterFileWriter();


/**Write raster file /**Write raster file
@param iter raster iterator @param pipe raster pipe
@param nCols number of output columns @param nCols number of output columns
@param nRows number of output rows (or -1 to automatically calculate row number to have square pixels) @param nRows number of output rows (or -1 to automatically calculate row number to have square pixels)
@param outputExtent extent to output @param outputExtent extent to output
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsstylev2.h
Expand Up @@ -106,7 +106,7 @@ class CORE_EXPORT QgsStyleV2
//! adds a new tag and returns the tag's id //! adds a new tag and returns the tag's id
int addTag( QString tagName ); int addTag( QString tagName );


//! applies the specifed group to the symbol or colorramp specified by StyleEntity //! applies the specified group to the symbol or colorramp specified by StyleEntity
bool group( StyleEntity type, QString name, int groupid ); bool group( StyleEntity type, QString name, int groupid );


//! rename the given entity with the specified id //! rename the given entity with the specified id
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvasmap.cpp
Expand Up @@ -84,7 +84,7 @@ void QgsMapCanvasMap::render()


paint.end(); paint.end();


// convert QImage to QPixmap to acheive faster drawing on screen // convert QImage to QPixmap to achieve faster drawing on screen
mPixmap = QPixmap::fromImage( mImage ); mPixmap = QPixmap::fromImage( mImage );
} }
else else
Expand Down
14 changes: 7 additions & 7 deletions src/gui/qgsowssourceselect.cpp
Expand Up @@ -177,7 +177,7 @@ void QgsOWSSourceSelect::populateFormats()
formatsMap.insert( "jpg", "jpeg" ); formatsMap.insert( "jpg", "jpeg" );
formatsMap.insert( "png", "png" ); formatsMap.insert( "png", "png" );


int prefered = -1; int preferred = -1;
int firstEnabled = -1; int firstEnabled = -1;
QStringList layersFormats = selectedLayersFormats(); QStringList layersFormats = selectedLayersFormats();
for ( int i = 0; i < layersFormats.size(); i++ ) for ( int i = 0; i < layersFormats.size(); i++ )
Expand Down Expand Up @@ -213,9 +213,9 @@ void QgsOWSSourceSelect::populateFormats()
if ( firstEnabled < 0 ) { firstEnabled = i; } if ( firstEnabled < 0 ) { firstEnabled = i; }
if ( simpleFormat.contains( "tif" ) ) // prefer *tif* if ( simpleFormat.contains( "tif" ) ) // prefer *tif*
{ {
if ( prefered < 0 || simpleFormat.startsWith( "g" ) ) // prefere geotiff if ( preferred < 0 || simpleFormat.startsWith( "g" ) ) // prefer geotiff
{ {
prefered = i; preferred = i;
} }
} }
} }
Expand All @@ -230,12 +230,12 @@ void QgsOWSSourceSelect::populateFormats()
btn->setText( label ); btn->setText( label );
btn->setToolTip( tip ); btn->setToolTip( tip );
} }
// Set prefered // Set preferred
// TODO: all enabled for now, see above // TODO: all enabled for now, see above
prefered = prefered >= 0 ? prefered : firstEnabled; preferred = preferred >= 0 ? preferred : firstEnabled;
if ( prefered >= 0 ) if ( preferred >= 0 )
{ {
mImageFormatGroup->button( prefered )->setChecked( true ); mImageFormatGroup->button( preferred )->setChecked( true );
} }


mImageFormatsGroupBox->setEnabled( true ); mImageFormatsGroupBox->setEnabled( true );
Expand Down

0 comments on commit 15b46e6

Please sign in to comment.