Skip to content

Commit 2e26ecf

Browse files
author
wonder
committed
- removed legacy macro QgsDebug and changed remaining occurences of it to QgsDebugMsg
- moved #include "qgsconfig.h" from qgis.h to qgis.cpp so it doesn't spit many warnings when building bindings because of redefined PREFIX git-svn-id: http://svn.osgeo.org/qgis/trunk@6730 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1873c9e commit 2e26ecf

File tree

5 files changed

+12
-25
lines changed

5 files changed

+12
-25
lines changed

src/app/qgsvectorlayerproperties.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@
1818
/* $Id$ */
1919

2020
#include "qgsvectorlayerproperties.h"
21+
2122
#include "qgsattributeactiondialog.h"
23+
#include "qgscontexthelp.h"
2224
#include "qgscontinuouscolordialog.h"
2325
#include "qgscoordinatetransform.h"
2426
#include "qgsgraduatedsymboldialog.h"
2527
#include "qgslabel.h"
2628
#include "qgslabeldialog.h"
2729
#include "qgslayerprojectionselector.h"
30+
#include "qgslogger.h"
2831
#include "qgssinglesymboldialog.h"
2932
#include "qgsuniquevaluedialog.h"
3033
#include "qgsvectordataprovider.h"
3134
#include "qgsvectorlayer.h"
32-
#include "qgscontexthelp.h"
35+
3336
#ifdef HAVE_POSTGRESQL
3437
#include "qgspgquerybuilder.h"
3538
#include "../providers/postgres/qgspostgresprovider.h"
@@ -407,7 +410,7 @@ QString QgsVectorLayerProperties::getMetadata()
407410

408411
if ( vectorType < 0 || vectorType > QGis::Polygon )
409412
{
410-
QgsDebug( "Invalid vector type" );
413+
QgsDebugMsg( "Invalid vector type" );
411414
}
412415
else
413416
{
@@ -496,7 +499,7 @@ QString QgsVectorLayerProperties::getMetadata()
496499
}
497500
catch(QgsCsException &cse)
498501
{
499-
QgsDebug( cse.what() );
502+
QgsDebugMsg( cse.what() );
500503

501504
myMetadataQString += "<tr><td bgcolor=\"white\">";
502505
myMetadataQString += tr("In project spatial reference system units : ");

src/core/qgis.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#ifndef QGSSVNVERSION
44
#include "qgssvnversion.h"
55
#endif
6+
7+
#include "qgsconfig.h"
8+
69
// Version constants
710
//
811

src/core/qgis.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
*
2929
* This API documentation provides information about all classes that make up QGIS.
3030
*/
31-
#include "qgsconfig.h"
3231

3332
#include <qevent.h>
3433

@@ -132,22 +131,4 @@ class CORE_EXPORT QGis
132131
const int USER_PROJECTION_START_ID=100000;
133132

134133

135-
136-
/** debugging convenience function
137-
138-
Wrapper round qDebug() that's only embedded if QGISDEBUG set, thus
139-
elminating large blocks of #ifdef/#endif text. Also uses GNU g++
140-
__FUNCTION__ extension if that compiler used.
141-
142-
*/
143-
#ifdef QGISDEBUG
144-
#ifdef __GNUG__
145-
#define QgsDebug(str) qDebug("%s:%d %s, %s", __FILE__, __LINE__, __FUNCTION__, str)
146-
#else
147-
#define QgsDebug(str) qDebug("%s:%d %s", __FILE__, __LINE__, str)
148-
#endif
149-
#else
150-
#define QgsDebug(str)
151-
#endif
152-
153134
#endif

src/core/qgsproject.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ QgsProject * QgsProject::theProject_;
324324
*/
325325
void clear()
326326
{
327-
QgsDebug( "Clearing project properties Impl->clear();" );
327+
QgsDebugMsg( "Clearing project properties Impl->clear();" );
328328

329329
properties_.clearKeys();
330330
title = "";
@@ -582,7 +582,7 @@ static QString _getVersion(QDomDocument const &doc)
582582

583583
if (!nl.count())
584584
{
585-
QgsDebug(" unable to find qgis element in project file");
585+
QgsDebugMsg(" unable to find qgis element in project file");
586586
return "";
587587
}
588588

src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ bool QgsVectorLayer::setDataProvider( QString const & provider )
17241724
}
17251725
else
17261726
{
1727-
QgsDebug( " unable to get data provider" );
1727+
QgsDebugMsg( " unable to get data provider" );
17281728

17291729
return false;
17301730
}

0 commit comments

Comments
 (0)