Skip to content

Commit 044eff8

Browse files
author
g_j_m
committed
Misc. tidy ups of debugging output - make some output only happen when
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/qgis@5456 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 70419f5 commit 044eff8

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

src/gui/qgisapp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3135,7 +3135,7 @@ void QgisApp::exportMapServer()
31353135
}
31363136
void QgisApp::zoomIn()
31373137
{
3138-
qDebug ("Setting map tool to zoomIn");
3138+
QgsDebugMsg ("Setting map tool to zoomIn");
31393139

31403140
QgsMapTool* tool = new QgsMapToolZoom(mMapCanvas, FALSE /* zoomOut */);
31413141
tool->setAction(mActionZoomIn);

src/gui/qgscoordinatetransform.cpp

+12-15
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
//qt includes
2222
#include <QDomNode>
2323
#include <QDomElement>
24-
25-
// Qt4-only includes to go here
2624
#include <QTextOStream>
2725
#include <QApplication>
2826

@@ -167,22 +165,21 @@ void QgsCoordinateTransform::initialise()
167165

168166
if (mInitialisedFlag)
169167
{
170-
171-
std::cout << "------------------------------------------------------------"<< std::endl;
172-
std::cout << "QgsCoordinateTransform::initialise()" << std::endl;
173-
std::cout << "The OGR Coordinate transformation for this layer was set to" << std::endl;
174-
// note overloaded << operator on qgsspatialrefsys cant be used on pointers -
175-
// so we dereference them like this (*mSourceSRS) (Thanks Lars for pointing that out)
176-
std::cout << "INPUT: " << std::endl << mSourceSRS << std::endl;
177-
std::cout << "OUTPUT: " << std::endl << mDestSRS << std::endl;
178-
std::cout << "------------------------------------------------------------" << std::endl;
168+
#ifdef QGISDEBUG
169+
std::cout << "------------------------------------------------------------\n"
170+
<< "QgsCoordinateTransform::initialise()\n"
171+
<< "The OGR Coordinate transformation for this layer was set to\n"
172+
<< "INPUT: \n" << mSourceSRS << '\n'
173+
<< "OUTPUT: \n" << mDestSRS << '\n'
174+
<< "------------------------------------------------------------\n";
179175
}
180176
else
181177
{
182-
std::cout << "------------------------------------------------------------"<< std::endl;
183-
std::cout << "QgsCoordinateTransform::initialise()" << std::endl;
184-
std::cout << "The OGR Coordinate transformation FAILED TO INITIALISE!" << std::endl;
185-
std::cout << "------------------------------------------------------------"<< std::endl;
178+
std::cout<< "------------------------------------------------------------\n"
179+
<< "QgsCoordinateTransform::initialise()\n"
180+
<< "The OGR Coordinate transformation FAILED TO INITIALISE!\n"
181+
<< "------------------------------------------------------------\n";
182+
#endif
186183
}
187184
}
188185

src/gui/qgsmaprender.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void QgsMapRender::render(QPainter* painter)
218218
// added these comments and debug statement to help others...
219219
QgsDebugMsg("If there is a QPaintEngine error here, it is caused by an emit call");
220220

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

224224
if (!ml)

src/providers/grass/qgsgrass.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ void QgsGrass::init( void )
8080
// or when set explicitly by the user.
8181
// This value should always take precedence.
8282
QString gisBase = getenv("GISBASE");
83-
std::cerr << "gisBase = " << gisBase.toLocal8Bit().data() << std::endl;
8483
#ifdef QGISDEBUG
8584
qDebug( "%s:%d GRASS gisBase from GISBASE env var is: %s", __FILE__, __LINE__, (const char*)gisBase );
8685
#endif

0 commit comments

Comments
 (0)