Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 17, 2012
1 parent ee27f09 commit 9faa401
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@ void QgsRasterLayerProperties::on_pbnExportTransparentPixelValues_clicked()

void QgsRasterLayerProperties::transparencyCellTextEdited( const QString & text )
{
Q_UNUSED( text );
QgsDebugMsg( QString( "text = %1" ).arg( text ) );
QgsRasterRenderer* renderer = mRendererWidget->renderer();
if ( !renderer )
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgscoordinatereferencesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ void QgsCoordinateReferenceSystem::setupESRIWktFix( )
QgsDebugMsg( QString( "set GDAL_FIX_ESRI_WKT : %1" ).arg( configNew ) );
}
else
{
QgsDebugMsg( QString( "GDAL_FIX_ESRI_WKT was already set : %1" ).arg( configNew ) );
}
#endif
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/raster/qgsrasterblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ bool QgsRasterBlock::setValue( size_t index, double value )
QgsDebugMsg( "Data block not allocated" );
return false;
}
if ( index < 0 || index >= ( size_t )mWidth*mHeight )
if ( index >= ( size_t )mWidth*mHeight )
{
QgsDebugMsg( QString( "Index %1 out of range (%2 x %3)" ).arg( index ).arg( mWidth ).arg( mHeight ) );
return false;
Expand Down Expand Up @@ -375,7 +375,7 @@ bool QgsRasterBlock::setIsNoData()
char * QgsRasterBlock::bits( size_t index )
{
// Not testing type to avoid too much overhead because this method is called per pixel
if ( index < 0 || index >= ( size_t )mWidth*mHeight )
if ( index >= ( size_t )mWidth*mHeight )
{
QgsDebugMsg( QString( "Index %1 out of range (%2 x %3)" ).arg( index ).arg( mWidth ).arg( mHeight ) );
return 0;
Expand Down
10 changes: 10 additions & 0 deletions src/core/symbology-ng/qgscptcityarchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,15 @@ QMap< QString, QString > QgsCptCityArchive::description( const QString& fileName

QDomElement e = docElem.firstChildElement( "name" );
if ( e.isNull() )
{
QgsDebugMsg( "name tag missing" );
}
descMap[ "name" ] = e.text().simplified();
e = docElem.firstChildElement( "full" );
if ( e.isNull() )
{
QgsDebugMsg( "full tag missing" );
}
descMap[ "full" ] = e.text().simplified();

return descMap;
Expand Down Expand Up @@ -376,7 +380,9 @@ QMap< double, QPair<QColor, QColor> >QgsCptCityArchive::gradientColorMap( const
colorMap[offset] = qMakePair( color, color );
}
else
{
QgsDebugMsg( QString( "at offset=%1 invalid color" ).arg( offset ) );
}
}
else
{
Expand Down Expand Up @@ -460,7 +466,9 @@ void QgsCptCityArchive::initArchives( bool loadAll )
if ( QDir( it.value() ).exists() )
QgsCptCityArchive::initArchive( it.key(), it.value() );
else
{
QgsDebugMsg( QString( "not loading archive [%1] because dir %2 does not exist " ).arg( it.key() ).arg( it.value() ) );
}
}
mDefaultArchiveName = defArchiveName;
}
Expand Down Expand Up @@ -837,7 +845,9 @@ QVector< QgsCptCityDataItem* > QgsCptCityCollectionItem::childrenRamps( bool rec
// should also delete item from parent, but we are in a loop now
}
else
{
QgsDebugMsg( "invalid item " + childItem->path() );
}
}
return rampItems;
}
Expand Down
4 changes: 4 additions & 0 deletions src/gui/qgscollapsiblegroupbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,13 @@ void QgsCollapsibleGroupBox::showEvent( QShowEvent * event )
else
mParentScrollArea = 0;
if ( mParentScrollArea )
{
QgsDebugMsg( "found a QScrollArea parent: " + mParentScrollArea->objectName() );
}
else
{
QgsDebugMsg( "did not find a QScrollArea parent" );
}

loadState();

Expand Down
1 change: 1 addition & 0 deletions src/gui/raster/qgsmultibandcolorrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ void QgsMultiBandColorRendererWidget::onBandChanged( int index )

void QgsMultiBandColorRendererWidget::loadMinMax( int theBandNo, double theMin, double theMax, int theOrigin )
{
Q_UNUSED( theOrigin );
QgsDebugMsg( QString( "theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) );

QLineEdit *myMinLineEdit, *myMaxLineEdit;
Expand Down
1 change: 1 addition & 0 deletions src/gui/raster/qgssinglebandgrayrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ QgsRasterRenderer* QgsSingleBandGrayRendererWidget::renderer()

void QgsSingleBandGrayRendererWidget::loadMinMax( int theBandNo, double theMin, double theMax, int theOrigin )
{
Q_UNUSED( theBandNo );
Q_UNUSED( theOrigin );
QgsDebugMsg( QString( "theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) );

Expand Down
1 change: 1 addition & 0 deletions src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ void QgsSingleBandPseudoColorRendererWidget::on_mBandComboBox_currentIndexChange

void QgsSingleBandPseudoColorRendererWidget::loadMinMax( int theBandNo, double theMin, double theMax, int theOrigin )
{
Q_UNUSED( theBandNo );
QgsDebugMsg( QString( "theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) );

if ( qIsNaN( theMin ) )
Expand Down
4 changes: 4 additions & 0 deletions src/gui/symbology-ng/qgscptcitycolorrampv2dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ void QgsCptCityColorRampV2Dialog::updateTreeView( QgsCptCityDataItem *item, bool
updateListWidget( item );
}
else
{
QgsDebugMsg( QString( "item %1 has invalid type %2" ).arg( item->path() ).arg(( int )item->type() ) );
}
}

void QgsCptCityColorRampV2Dialog::on_mListWidget_itemClicked( QListWidgetItem * item )
Expand All @@ -308,7 +310,9 @@ void QgsCptCityColorRampV2Dialog::on_mListWidget_itemClicked( QListWidgetItem *
populateVariants();
}
else
{
QgsDebugMsg( QString( "item %1 has invalid type %2" ).arg( rampItem->path() ).arg(( int )rampItem->type() ) );
}
}

void QgsCptCityColorRampV2Dialog::on_tabBar_currentChanged( int index )
Expand Down
3 changes: 3 additions & 0 deletions src/providers/grass/qgsgrassrasterprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ int QgsGrassRasterProvider::ySize() const { return mRows; }

QMap<int, QVariant> QgsGrassRasterProvider::identify( const QgsPoint & thePoint, IdentifyFormat theFormat, const QgsRectangle &theExtent, int theWidth, int theHeight )
{
Q_UNUSED( theExtent );
Q_UNUSED( theWidth );
Q_UNUSED( theHeight );
QgsDebugMsg( "Entered" );
QMap<int, QVariant> results;

Expand Down
2 changes: 2 additions & 0 deletions tests/src/core/testqgsdataitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ bool TestQgsDataItem::isValidDirItem( QgsDirectoryItem *item )
void TestQgsDataItem::testValid()
{
if ( mDirItem )
{
QgsDebugMsg( QString( "dirItem has %1 children" ).arg( mDirItem->rowCount() ) );
}
QVERIFY( isValidDirItem( mDirItem ) );
}

Expand Down

0 comments on commit 9faa401

Please sign in to comment.