Skip to content

Commit

Permalink
Some more tweaks to debug statements
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@5458 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed May 15, 2006
1 parent 41b46eb commit 8e7de6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/plugins/grass/qgsgrassedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include "qgsvertexmarker.h"
#include "qgsrubberband.h"
#include "qgsproject.h"
#include "qgslogger.h"

extern "C" {
#include <grass/gis.h>
Expand Down Expand Up @@ -146,20 +147,20 @@ bool QgsGrassEdit::isEditable ( QgsMapLayer *layer )
{
if ( !layer ) return false;

std::cerr << "layer name: " << layer->name().toLocal8Bit().data() << std::endl;
QgsDebugMsg("layer name: " + layer->name());

if ( layer->type() != QgsMapLayer::VECTOR ) {
std::cerr << "The selected layer is not vector." << std::endl;
QgsDebugMsg("The selected layer is not vector.");
return false;
}

//TODO dynamic_cast ?
QgsVectorLayer *vector = (QgsVectorLayer*)layer;

std::cerr << "Vector layer type: " << vector->providerType().toLocal8Bit().data() << std::endl;
QgsDebugMsg("Vector layer type: " + vector->providerType());

if ( vector->providerType() != "grass" ) {
std::cerr << "The selected layer is not GRASS." << std::endl;
QgsDebugMsg("The selected layer is not GRASS.");
return false;
}

Expand Down Expand Up @@ -1570,7 +1571,7 @@ void QgsGrassEdit::displayUpdated (void)

void QgsGrassEdit::displayElement ( int line, const QPen & pen, int size, QPainter *painter)
{
#if QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::displayElement() line = " << line << std::endl;
#endif

Expand Down Expand Up @@ -1650,7 +1651,7 @@ void QgsGrassEdit::displayDynamic ( struct line_pnts *Points )

void QgsGrassEdit::displayDynamic ( double x, double y, int type, int size )
{
#if QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::displayDynamic icon" << std::endl;
#endif

Expand All @@ -1659,7 +1660,7 @@ void QgsGrassEdit::displayDynamic ( double x, double y, int type, int size )

void QgsGrassEdit::displayDynamic ( struct line_pnts *Points, double x, double y, int type, int size )
{
#if QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::displayDynamic Points = " << Points << " type = " << type << std::endl;
#endif
QgsPoint point;
Expand Down Expand Up @@ -1690,7 +1691,7 @@ void QgsGrassEdit::displayDynamic ( struct line_pnts *Points, double x, double y

void QgsGrassEdit::displayNode ( int node, const QPen & pen, int size, QPainter *painter )
{
#if QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::displayNode() node = " << node << std::endl;
#endif

Expand Down Expand Up @@ -1742,7 +1743,7 @@ QgsPoint QgsGrassEdit::transformLayerToMap ( QgsPoint point)
void QgsGrassEdit::displayIcon ( double x, double y, const QPen & pen,
int type, int size, QPainter *painter )
{
#if QGISDEBUG
#ifdef QGISDEBUG
std::cerr << "QgsGrassEdit::displayIcon()" << std::endl;
#endif

Expand Down
3 changes: 2 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "qgspostgresextentthread.h"

#include "qgspostgisbox3d.h"
#include "qgslogger.h"

#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
Expand Down Expand Up @@ -370,7 +371,7 @@ QgsPostgresProvider::~QgsPostgresProvider()
#endif
PQfinish(connection);

std::cout << "QgsPostgresProvider: deconstructing." << std::endl;
QgsDebugMsg("QgsPostgresProvider: deconstructing.");

//pLog.flush();
}
Expand Down

0 comments on commit 8e7de6f

Please sign in to comment.