Skip to content
Permalink
Browse files

changed some debug statements to use QgsDebugMsg

git-svn-id: http://svn.osgeo.org/qgis/trunk@8602 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jun 6, 2008
1 parent fd0e11a commit 4c5e0e17d075b4505fa30b890143b3648f5b0631
Showing with 9 additions and 21 deletions.
  1. +4 −12 src/core/qgsdistancearea.cpp
  2. +5 −9 src/core/qgsvectorlayer.cpp
@@ -114,9 +114,7 @@ bool QgsDistanceArea::setEllipsoid(const QString& ellipsoid)
// row for this ellipsoid wasn't found?
if (radius.isEmpty() || parameter2.isEmpty())
{
#ifdef QGISDEBUG
std::cout << "setEllipsoid: no row in tbl_ellipsoid for acronym '" << ellipsoid.toLocal8Bit().data() << "'" << std::endl;
#endif
QgsDebugMsg(QString("setEllipsoid: no row in tbl_ellipsoid for acronym '") + ellipsoid.toLocal8Bit().data() + "'")
return false;
}

@@ -125,9 +123,7 @@ bool QgsDistanceArea::setEllipsoid(const QString& ellipsoid)
mSemiMajor = radius.mid(2).toDouble();
else
{
#ifdef QGISDEBUG
std::cout << "setEllipsoid: wrong format of radius field: '" << radius.toLocal8Bit().data() << "'" << std::endl;
#endif
QgsDebugMsg(QString("setEllipsoid: wrong format of radius field: '") + radius.toLocal8Bit().data() + "'")
return false;
}

@@ -146,15 +142,11 @@ bool QgsDistanceArea::setEllipsoid(const QString& ellipsoid)
}
else
{
#ifdef QGISDEBUG
std::cout << "setEllipsoid: wrong format of parameter2 field: '" << parameter2.toLocal8Bit().data() << "'" << std::endl;
#endif
QgsDebugMsg(QString("setEllipsoid: wrong format of parameter2 field: '") + parameter2.toLocal8Bit().data() + "'")
return false;
}

#ifdef QGISDEBUG
std::cout << "setEllipsoid: a=" << mSemiMajor << ", b=" << mSemiMinor << ", 1/f=" << mInvFlattening << std::endl;
#endif
QgsDebugMsg(QString("setEllipsoid: a=") + mSemiMajor + ", b=" + mSemiMinor + ", 1/f=" + mInvFlattening)


// get spatial ref system for ellipsoid
@@ -2009,9 +2009,8 @@ bool QgsVectorLayer::startEditing()

bool QgsVectorLayer::readXML_( QDomNode & layer_node )
{
#ifdef QGISDEBUG
std::cerr << "Datasource in QgsVectorLayer::readXML_: " << mDataSource.toLocal8Bit().data() << std::endl;
#endif
QgsDebugMsg(QString("Datasource in QgsVectorLayer::readXML_: ") + mDataSource.toLocal8Bit().data());

// process the attribute actions
mActions->readXML(layer_node);

@@ -2131,17 +2130,14 @@ bool QgsVectorLayer::readXML_( QDomNode & layer_node )
setLabelOn(true);
}

#ifdef QGISDEBUG
std::cout << "Testing if qgsvectorlayer can call label readXML routine" << std::endl;
#endif
QgsDebugMsg("Testing if qgsvectorlayer can call label readXML routine")


QDomNode labelattributesnode = layer_node.namedItem("labelattributes");

if(!labelattributesnode.isNull())
{
#ifdef QGISDEBUG
std::cout << "qgsvectorlayer calling label readXML routine" << std::endl;
#endif
QgsDebugMsg("qgsvectorlayer calling label readXML routine")
mLabel->readXML(labelattributesnode);
}

0 comments on commit 4c5e0e1

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