Skip to content
Permalink
Browse files

Use QgsDebugMsg instead of qDebug

  • Loading branch information
wonder-sk committed Sep 9, 2016
1 parent f6a2a5e commit 04b2239dde395d521a09d1f8da748b4484fc0001
Showing with 5 additions and 7 deletions.
  1. +2 −4 src/core/raster/qgsrasterlayerrenderer.cpp
  2. +3 −3 src/providers/wms/qgswmsprovider.cpp
@@ -236,8 +236,6 @@ QgsRasterLayerRenderer::Feedback::Feedback( QgsRasterLayerRenderer *r )

void QgsRasterLayerRenderer::Feedback::onNewData()
{
qDebug( "\nGOT NEW DATA!\n" );

if ( !renderPartialOutput() )
return; // we were not asked for partial renders and we may not have a temporary image for overwriting...

@@ -248,7 +246,7 @@ void QgsRasterLayerRenderer::Feedback::onNewData()

// TODO: update only the area that got new data

qDebug( "new raster preview! %d", mLastPreview.msecsTo( QTime::currentTime() ) );
QgsDebugMsg( QString( "new raster preview! %1" ).arg( mLastPreview.msecsTo( QTime::currentTime() ) ) );
QTime t;
t.start();
QgsRasterBlockFeedback feedback;
@@ -257,6 +255,6 @@ void QgsRasterLayerRenderer::Feedback::onNewData()
QgsRasterIterator iterator( mR->mPipe->last() );
QgsRasterDrawer drawer( &iterator );
drawer.draw( mR->mPainter, mR->mRasterViewPort, mR->mMapToPixel, &feedback );
qDebug( "PREVIEW TOOK %d ms", t.elapsed() );
QgsDebugMsg( QString( "total raster preview time: %1 ms" ).arg( t.elapsed() ) );
mLastPreview = QTime::currentTime();
}
@@ -834,8 +834,8 @@ QImage *QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth, i

if ( feedback && feedback->isPreviewOnly() )
{
qDebug( "PREVIEW - CACHED: %d / MISSING: %d", tileImages.count(), requests.count() - tileImages.count() );
qDebug( "PREVIEW - TIME: this res %d ms | other res %d ms | TOTAL %d ms", t0 + t2, t1, t0 + t1 + t2 );
QgsDebugMsg( QString( "PREVIEW - CACHED: %1 / MISSING: %2" ).arg( tileImages.count() ).arg( requests.count() - tileImages.count() ) );
QgsDebugMsg( QString( "PREVIEW - TIME: this res %1 ms | other res %2 ms | TOTAL %3 ms" ).arg( t0 + t2 ).arg( t1 ).arg( t0 + t1 + t2 ) );
}
else if ( !requestsFinal.isEmpty() )
{
@@ -852,7 +852,7 @@ QImage *QgsWmsProvider::draw( QgsRectangle const & viewExtent, int pixelWidth, i
handler.downloadBlocking();
}

qDebug( "TILE CACHE total: %d / %d ", QgsTileCache::totalCost(), QgsTileCache::maxCost() );
QgsDebugMsg( QString( "TILE CACHE total: %1 / %2" ).arg( QgsTileCache::totalCost() ).arg( QgsTileCache::maxCost() ) );

#if 0
const QgsWmsStatistics::Stat& stat = QgsWmsStatistics::statForUri( dataSourceUri() );

0 comments on commit 04b2239

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