Skip to content

Commit

Permalink
Use QgsDebugMsg instead of qDebug
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Sep 9, 2016
1 parent f6a2a5e commit 04b2239
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/core/raster/qgsrasterlayerrenderer.cpp
Expand Up @@ -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...

Expand All @@ -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;
Expand All @@ -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();
}
6 changes: 3 additions & 3 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -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() )
{
Expand All @@ -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() );
Expand Down

0 comments on commit 04b2239

Please sign in to comment.