Skip to content

Commit

Permalink
changed some debug statements to use QgsDebugMsg
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8602 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 6, 2008
1 parent 1af87f3 commit 7fea0b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
16 changes: 4 additions & 12 deletions src/core/qgsdistancearea.cpp
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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
Expand Down
14 changes: 5 additions & 9 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 7fea0b3

Please sign in to comment.