Skip to content
Permalink
Browse files

fix warnings

  • Loading branch information
jef-n committed Oct 17, 2012
1 parent ee27f09 commit 9faa4017b8ad788b9773f112763494f756203c96
@@ -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 )
@@ -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
}

@@ -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;
@@ -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;
@@ -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;
@@ -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
{
@@ -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;
}
@@ -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;
}
@@ -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();

@@ -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;
@@ -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 ) );

@@ -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 ) )
@@ -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 )
@@ -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 )
@@ -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;

@@ -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 ) );
}

0 comments on commit 9faa401

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