Skip to content

Commit

Permalink
Misc. tidy ups of debugging output - make some output only happen when
Browse files Browse the repository at this point in the history
in debug mode.

Disable updating the progress bar as it doesn't currently work and
just serves to produce a confusing error message from Qt


git-svn-id: http://svn.osgeo.org/qgis/trunk@5456 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed May 15, 2006
1 parent d0c086c commit 989dfab
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/gui/qgisapp.cpp
Expand Up @@ -3135,7 +3135,7 @@ void QgisApp::exportMapServer()
}
void QgisApp::zoomIn()
{
qDebug ("Setting map tool to zoomIn");
QgsDebugMsg ("Setting map tool to zoomIn");

QgsMapTool* tool = new QgsMapToolZoom(mMapCanvas, FALSE /* zoomOut */);
tool->setAction(mActionZoomIn);
Expand Down
27 changes: 12 additions & 15 deletions src/gui/qgscoordinatetransform.cpp
Expand Up @@ -21,8 +21,6 @@
//qt includes
#include <QDomNode>
#include <QDomElement>

// Qt4-only includes to go here
#include <QTextOStream>
#include <QApplication>

Expand Down Expand Up @@ -167,22 +165,21 @@ void QgsCoordinateTransform::initialise()

if (mInitialisedFlag)
{

std::cout << "------------------------------------------------------------"<< std::endl;
std::cout << "QgsCoordinateTransform::initialise()" << std::endl;
std::cout << "The OGR Coordinate transformation for this layer was set to" << std::endl;
// note overloaded << operator on qgsspatialrefsys cant be used on pointers -
// so we dereference them like this (*mSourceSRS) (Thanks Lars for pointing that out)
std::cout << "INPUT: " << std::endl << mSourceSRS << std::endl;
std::cout << "OUTPUT: " << std::endl << mDestSRS << std::endl;
std::cout << "------------------------------------------------------------" << std::endl;
#ifdef QGISDEBUG
std::cout << "------------------------------------------------------------\n"
<< "QgsCoordinateTransform::initialise()\n"
<< "The OGR Coordinate transformation for this layer was set to\n"
<< "INPUT: \n" << mSourceSRS << '\n'
<< "OUTPUT: \n" << mDestSRS << '\n'
<< "------------------------------------------------------------\n";
}
else
{
std::cout << "------------------------------------------------------------"<< std::endl;
std::cout << "QgsCoordinateTransform::initialise()" << std::endl;
std::cout << "The OGR Coordinate transformation FAILED TO INITIALISE!" << std::endl;
std::cout << "------------------------------------------------------------"<< std::endl;
std::cout<< "------------------------------------------------------------\n"
<< "QgsCoordinateTransform::initialise()\n"
<< "The OGR Coordinate transformation FAILED TO INITIALISE!\n"
<< "------------------------------------------------------------\n";
#endif
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmaprender.cpp
Expand Up @@ -218,7 +218,7 @@ void QgsMapRender::render(QPainter* painter)
// added these comments and debug statement to help others...
QgsDebugMsg("If there is a QPaintEngine error here, it is caused by an emit call");

emit setProgress(myRenderCounter++,layers.size());
//emit setProgress(myRenderCounter++,layers.size());
QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer(*li);

if (!ml)
Expand Down
1 change: 0 additions & 1 deletion src/providers/grass/qgsgrass.cpp
Expand Up @@ -80,7 +80,6 @@ void QgsGrass::init( void )
// or when set explicitly by the user.
// This value should always take precedence.
QString gisBase = getenv("GISBASE");
std::cerr << "gisBase = " << gisBase.toLocal8Bit().data() << std::endl;
#ifdef QGISDEBUG
qDebug( "%s:%d GRASS gisBase from GISBASE env var is: %s", __FILE__, __LINE__, (const char*)gisBase );
#endif
Expand Down

0 comments on commit 989dfab

Please sign in to comment.