Navigation Menu

Skip to content

Commit

Permalink
Less verbosity to stdout from labeling plugin
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12508 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 18, 2009
1 parent 9b8a836 commit 54824b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/core/pal/pal.cpp
Expand Up @@ -493,7 +493,9 @@ namespace pal

Feats *feat;

std::cout << "FIRSST NBFT : " << prob->nbft << std::endl;
#ifdef _VERBOSE_
std::cout << "FIRST NBFT : " << prob->nbft << std::endl;
#endif

// Filtering label positions against obstacles
amin[0] = amin[1] = -DBL_MAX;
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsgeometry.cpp
Expand Up @@ -4117,7 +4117,7 @@ bool QgsGeometry::exportWkbToGeos()
hasZValue = true;
case QGis::WKBLineString:
{
QgsDebugMsg( "Linestring found" );
QgsDebugMsgLevel( "Linestring found", 3 );

QgsPolyline sequence;

Expand Down Expand Up @@ -4181,7 +4181,7 @@ bool QgsGeometry::exportWkbToGeos()
hasZValue = true;
case QGis::WKBPolygon:
{
QgsDebugMsg( "Polygon found" );
QgsDebugMsgLevel( "Polygon found", 3 );

// get number of rings in the polygon
numRings = ( int * )( mGeometry + 1 + sizeof( int ) );
Expand Down Expand Up @@ -4223,7 +4223,7 @@ bool QgsGeometry::exportWkbToGeos()
hasZValue = true;
case QGis::WKBMultiPolygon:
{
QgsDebugMsg( "Multipolygon found" );
QgsDebugMsgLevel( "Multipolygon found", 3 );

QVector<GEOSGeometry*> polygons;

Expand Down
9 changes: 5 additions & 4 deletions src/plugins/labeling/pallabeling.cpp
Expand Up @@ -21,6 +21,7 @@
#include <QTime>
#include <QPainter>

#include <qgslogger.h>
#include <qgsvectorlayer.h>
#include <qgsmaplayerregistry.h>
#include <qgsvectordataprovider.h>
Expand Down Expand Up @@ -240,7 +241,7 @@ void LayerSettings::registerFeature( QgsFeature& f )
}
catch ( std::exception* e )
{
std::cerr << "Ignoring feature " << f.id() << " due PAL exception: " << e->what() << std::endl;
QgsDebugMsg( QString( "Ignoring feature %1 due PAL exception: " ).arg( f.id() ) + QString::fromLatin1( e->what() ) );
return;
}

Expand Down Expand Up @@ -431,7 +432,7 @@ void PalLabeling::drawLabeling( QgsRenderContext& context )
}
catch ( std::exception& e )
{
std::cerr << "PAL EXCEPTION :-( " << e.what() << std::endl;
QgsDebugMsg( "PAL EXCEPTION :-( " + QString::fromLatin1( e.what() ) );
mActiveLayers.clear(); // clean up
return;
}
Expand Down Expand Up @@ -460,7 +461,7 @@ void PalLabeling::drawLabeling( QgsRenderContext& context )
// find the solution
labels = mPal->solveProblem( problem, mShowingAllLabels );

std::cout << "LABELING work: " << t.elapsed() << "ms ... labels# " << labels->size() << std::endl;
QgsDebugMsg( QString( "LABELING work: %1 ms ... labels# %2" ).arg( t.elapsed() ).arg( labels->size() ) );
t.restart();

painter->setRenderHint( QPainter::Antialiasing );
Expand All @@ -477,7 +478,7 @@ void PalLabeling::drawLabeling( QgsRenderContext& context )
drawLabel( *it, painter, xform );
}

std::cout << "LABELING draw: " << t.elapsed() << "ms" << std::endl;
QgsDebugMsg( QString( "LABELING draw: %1 ms" ).arg( t.elapsed() ) );

delete problem;
delete labels;
Expand Down

0 comments on commit 54824b7

Please sign in to comment.