[Qgis-developer] new QgsDebugCall macro

Sandro Santilli strk at keybit.net
Tue May 28 03:30:12 PDT 2013


I've pushed a new debugging macro for use to simplify tracing of
functions enter/exit events.

Use like this:

 void QgsMapToolNodeTool::canvasPressEvent( QMouseEvent * e )
 {
   QgsDebugCall;
   ....
 }

To get (with debugging builds) log messages like this:

 Debug: src/app/nodetool/qgsmaptoolnodetool.cpp: 348: (canvasPressEvent) Entering.
 Debug: src/app/nodetool/qgsmaptoolnodetool.cpp: 348: (canvasPressEvent) Leaving.

With non-debugging builds there will be no overhead.

--strk;

 http://strk.keybit.net 



More information about the Qgis-developer mailing list