- remove superfluous backslashes
- fix QgsDebugMsg macro
- disable code with #if 0/#endif instead of commenting it out
- remove namespaces from ogr converter plugin



git-svn-id: http://svn.osgeo.org/qgis/trunk@9218 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2008-08-30 14:53:45 +00:00
parent f6e43c76d8
commit 1e4e5fab04
46 changed files with 107 additions and 179 deletions

View File

@ -155,7 +155,7 @@ void QgsLegend::removeLayer( QString layer_key )
}
QTreeWidgetItem* theItem = firstItem();
QgsDebugMsg( "called." )
QgsDebugMsg( "called." );
while ( theItem )
{
@ -1255,7 +1255,7 @@ QTreeWidgetItem* QgsLegend::nextItem( QTreeWidgetItem* item )
{
return ( dynamic_cast<QgsLegendItem*>( litem->parent()->parent() )->nextSibling() );
}
else if ( litem->parent() && litem->parent()->parent() && litem->parent()->parent()->parent() && \
else if ( litem->parent() && litem->parent()->parent() && litem->parent()->parent()->parent() &&
(( QgsLegendItem* )( litem->parent()->parent()->parent() ) )->nextSibling() )//maximum four nesting states in the current legend
{
return ( dynamic_cast<QgsLegendItem*>( litem->parent()->parent()->parent() )->nextSibling() );

View File

@ -2859,7 +2859,7 @@ void QgisApp::newVectorLayer()
{
QgsDebugMsg( "ogr provider loaded" );
typedef bool ( *createEmptyDataSourceProc )( const QString&, const QString&, const QString&, QGis::WKBTYPE, \
typedef bool ( *createEmptyDataSourceProc )( const QString&, const QString&, const QString&, QGis::WKBTYPE,
const std::list<std::pair<QString, QString> >& );
createEmptyDataSourceProc createEmptyDataSource = ( createEmptyDataSourceProc ) cast_to_fptr( myLib->resolve( "createEmptyDataSource" ) );
if ( createEmptyDataSource )

View File

@ -77,7 +77,7 @@ QgsRasterLayer* QgisAppInterface::addRasterLayer( QString rasterLayerPath, QStri
return qgis->addRasterLayer( rasterLayerPath, baseName );
}
QgsRasterLayer* QgisAppInterface::addRasterLayer( const QString& url, const QString& baseName, const QString& providerKey, \
QgsRasterLayer* QgisAppInterface::addRasterLayer( const QString& url, const QString& baseName, const QString& providerKey,
const QStringList& layers, const QStringList& styles, const QString& format, const QString& crs )
{
return qgis->addRasterLayer( url, baseName, providerKey, layers, styles, format, crs );

View File

@ -55,7 +55,7 @@ class QgisAppInterface : public QgisInterface
//! Add a raster layer given its file name
QgsRasterLayer* addRasterLayer( QString rasterLayerPath, QString baseName );
//! Add a WMS layer
QgsRasterLayer* addRasterLayer( const QString& url, const QString& baseName, const QString& providerKey, \
QgsRasterLayer* addRasterLayer( const QString& url, const QString& baseName, const QString& providerKey,
const QStringList& layers, const QStringList& styles, const QString& format, const QString& crs );
//! Add a project

View File

@ -53,7 +53,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
QGis::WKBTYPE layerWKBType = vlayer->geometryType();
//no support for adding features to 2.5D types yet
if ( layerWKBType == QGis::WKBLineString25D || layerWKBType == QGis::WKBPolygon25D || \
if ( layerWKBType == QGis::WKBLineString25D || layerWKBType == QGis::WKBPolygon25D ||
layerWKBType == QGis::WKBMultiLineString25D || layerWKBType == QGis::WKBPoint25D || layerWKBType == QGis::WKBMultiPoint25D )
{
QMessageBox::critical( 0, QObject::tr( "2.5D shape type not supported" ), QObject::tr( "Adding features to 2.5D shapetypes is not supported yet" ) );
@ -109,7 +109,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
catch ( QgsCsException &cse )
{
Q_UNUSED( cse );
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ), \
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ),
QObject::tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}
@ -219,7 +219,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
else if ( error == 2 )
{
//problem with coordinate transformation
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ), \
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ),
QObject::tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}

View File

@ -40,7 +40,7 @@ void QgsMapToolAddIsland::canvasReleaseEvent( QMouseEvent * e )
if ( !vlayer )
{
QMessageBox::information( 0, QObject::tr( "Not a vector layer" ), \
QMessageBox::information( 0, QObject::tr( "Not a vector layer" ),
QObject::tr( "The current layer is not a vector layer" ) );
return;
}
@ -63,7 +63,7 @@ void QgsMapToolAddIsland::canvasReleaseEvent( QMouseEvent * e )
else if ( error == 2 )
{
//problem with coordinate transformation
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ), \
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ),
QObject::tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}

View File

@ -40,7 +40,7 @@ void QgsMapToolAddRing::canvasReleaseEvent( QMouseEvent * e )
if ( !vlayer )
{
QMessageBox::information( 0, QObject::tr( "Not a vector layer" ), \
QMessageBox::information( 0, QObject::tr( "Not a vector layer" ),
QObject::tr( "The current layer is not a vector layer" ) );
return;
}
@ -63,7 +63,7 @@ void QgsMapToolAddRing::canvasReleaseEvent( QMouseEvent * e )
else if ( error == 2 )
{
//problem with coordinate transformation
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ), \
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ),
QObject::tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}

View File

@ -39,7 +39,7 @@ void QgsMapToolSplitFeatures::canvasReleaseEvent( QMouseEvent * e )
if ( !vlayer )
{
QMessageBox::information( 0, QObject::tr( "Not a vector layer" ), \
QMessageBox::information( 0, QObject::tr( "Not a vector layer" ),
QObject::tr( "The current layer is not a vector layer" ) );
return;
}
@ -62,7 +62,7 @@ void QgsMapToolSplitFeatures::canvasReleaseEvent( QMouseEvent * e )
else if ( error == 2 )
{
//problem with coordinate transformation
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ), \
QMessageBox::information( 0, QObject::tr( "Coordinate transform error" ),
QObject::tr( "Cannot transform the point to the layers coordinate system" ) );
return;
}

View File

@ -175,23 +175,6 @@ void QgsPasteTransformations::layerChanged( const QString& layerName, std::vecto
// Fetch the fields that will be populated into the Transfer rows.
QgsDebugMsg( QString( "Layer changed to %1." ).arg( layerName ) );
/*
// XXX What does this code do??? [MD]
std::vector<QgsField> layerFields =
(mMapNameLookup[ layerName ])->fields();
fields->clear();
for (std::vector<QgsField>::iterator it = layerFields.begin();
it != layerFields.end();
++it )
{
QgsDebugMsg(QString("Got field %1.").arg(it->name()));
fields->push_back(it->name());
}
*/
restoreTransfers( sourceLayerComboBox ->currentText(),
destinationLayerComboBox->currentText() );
}

View File

@ -272,7 +272,7 @@ void QgsPluginManager::getPluginDescriptions()
}
else
{
QgsDebugMsg( "Plugin name not returned when queried\n" );
QgsDebugMsg( "Plugin name not returned when queried" );
}
if ( pDesc )
{
@ -280,7 +280,7 @@ void QgsPluginManager::getPluginDescriptions()
}
else
{
QgsDebugMsg( "Plugin description not returned when queried\n" );
QgsDebugMsg( "Plugin description not returned when queried" );
}
if ( pVersion )
{
@ -288,7 +288,7 @@ void QgsPluginManager::getPluginDescriptions()
}
else
{
QgsDebugMsg( "Plugin version not returned when queried\n" );
QgsDebugMsg( "Plugin version not returned when queried" );
}
if ( !pName || !pDesc || !pVersion )

View File

@ -2561,7 +2561,7 @@ void QgsRasterLayerProperties::on_mClassifyButton_clicked()
{
//because the highest value is also an entry, there are (numberOfEntries - 1)
//intervals
intervalDiff = ( myRasterBandStats.maxVal - myRasterBandStats.minVal ) / \
intervalDiff = ( myRasterBandStats.maxVal - myRasterBandStats.minVal ) /
( numberOfEntries - 1 );
}
else

View File

@ -43,7 +43,7 @@ class QgsSnappingDialog: public QDialog, private Ui::QgsSnappingDialogBase
QgsSnappingDialog( QgsMapCanvas* canvas, const QMap<QString, LayerEntry >& settings );
~QgsSnappingDialog();
/**Returns the snapping settings per layer. Key of the map is the layer id and value the \
/**Returns the snapping settings per layer. Key of the map is the layer id and value the
corresponding layer entry*/
void layerSettings( QMap<QString, LayerEntry>& settings ) const;

View File

@ -51,7 +51,7 @@ void QgsComposerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem*
//support multiline labels
double penWidth = pen().widthF();
QRectF painterRect(penWidth, penWidth, rect().width() - 2 * penWidth, \
QRectF painterRect(penWidth, penWidth, rect().width() - 2 * penWidth,
rect().height() - 2 * penWidth);
painter->drawText(painterRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, mText);

View File

@ -50,7 +50,7 @@ void QgsNumericScaleBarStyle::draw( QPainter* p, double xOffset ) const
p->save();
p->setFont( mScaleBar->font() );
p->drawText( QPointF( mScaleBar->pen().widthF() + mScaleBar->boxContentSpace(), mScaleBar->boxContentSpace() \
p->drawText( QPointF( mScaleBar->pen().widthF() + mScaleBar->boxContentSpace(), mScaleBar->boxContentSpace()
+ mScaleBar->fontHeight() ), scaleText() );
p->restore();
@ -65,8 +65,8 @@ QRectF QgsNumericScaleBarStyle::calculateBoxSize() const
}
QFontMetricsF fontMetrics( mScaleBar->font() );
return QRectF( mScaleBar->transform().dx(), mScaleBar->transform().dy(), 2 * mScaleBar->boxContentSpace() \
+ 2 * mScaleBar->pen().width() + fontMetrics.width( scaleText() ), \
return QRectF( mScaleBar->transform().dx(), mScaleBar->transform().dy(), 2 * mScaleBar->boxContentSpace()
+ 2 * mScaleBar->pen().width() + fontMetrics.width( scaleText() ),
mScaleBar->fontHeight() + 2 * mScaleBar->boxContentSpace() );
}

View File

@ -246,7 +246,7 @@ bool QgsCoordinateReferenceSystem::createFromWkt( QString theWkt )
if ( theWkt.isEmpty() )
{
QgsDebugMsg( "theWkt is uninitialised, operation failed" )
QgsDebugMsg( "theWkt is uninitialised, operation failed" );
QgsLogger::critical( "QgsCoordinateReferenceSystem::createFromWkt -- theWkt is uninitialised, operation failed" );
return mIsValidFlag;
}

View File

@ -121,7 +121,7 @@ bool QgsDistanceArea::setEllipsoid( const QString& ellipsoid )
// row for this ellipsoid wasn't found?
if ( radius.isEmpty() || parameter2.isEmpty() )
{
QgsDebugMsg( QString( "setEllipsoid: no row in tbl_ellipsoid for acronym '" ) + ellipsoid.toLocal8Bit().data() + "'" )
QgsDebugMsg( QString( "setEllipsoid: no row in tbl_ellipsoid for acronym '" ) + ellipsoid.toLocal8Bit().data() + "'" );
return false;
}
@ -130,7 +130,7 @@ bool QgsDistanceArea::setEllipsoid( const QString& ellipsoid )
mSemiMajor = radius.mid( 2 ).toDouble();
else
{
QgsDebugMsg( QString( "setEllipsoid: wrong format of radius field: '" ) + radius.toLocal8Bit().data() + "'" )
QgsDebugMsg( QString( "setEllipsoid: wrong format of radius field: '" ) + radius.toLocal8Bit().data() + "'" );
return false;
}
@ -149,11 +149,11 @@ bool QgsDistanceArea::setEllipsoid( const QString& ellipsoid )
}
else
{
QgsDebugMsg( QString( "setEllipsoid: wrong format of parameter2 field: '" ) + parameter2.toLocal8Bit().data() + "'" )
QgsDebugMsg( QString( "setEllipsoid: wrong format of parameter2 field: '" ) + parameter2.toLocal8Bit().data() + "'" );
return false;
}
QgsDebugMsg( QString( "setEllipsoid: a=" ) + mSemiMajor + ", b=" + mSemiMinor + ", 1/f=" + mInvFlattening )
QgsDebugMsg( QString( "setEllipsoid: a=" ) + mSemiMajor + ", b=" + mSemiMinor + ", 1/f=" + mInvFlattening );
// get spatial ref system for ellipsoid

View File

@ -35,13 +35,6 @@ email : morb at ozemail dot com dot au
return r; \
}
#define RELAY_GEOS() \
catch (GEOSException &e) \
{ \
Q_UNUSED(e); \
throw; \
}
class GEOSException
{
public:
@ -4479,8 +4472,8 @@ bool QgsGeometry::convertToMultiType()
QGis::WKBTYPE geomType = wkbType();
if ( geomType == QGis::WKBMultiPoint || geomType == QGis::WKBMultiPoint25D || \
geomType == QGis::WKBMultiLineString || geomType == QGis::WKBMultiLineString25D || \
if ( geomType == QGis::WKBMultiPoint || geomType == QGis::WKBMultiPoint25D ||
geomType == QGis::WKBMultiLineString || geomType == QGis::WKBMultiLineString25D ||
geomType == QGis::WKBMultiPolygon || geomType == QGis::WKBMultiPolygon25D || geomType == QGis::WKBUnknown )
{
return false; //no need to convert

View File

@ -132,7 +132,7 @@ class CORE_EXPORT QgsGeometry
double distance( QgsGeometry& geom );
/**
Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target pointand \
Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
and the indices of the vertices before/after. The vertices before/after are -1 if not present
*/
QgsPoint closestVertex( const QgsPoint& point, int& atVertex, int& beforeVertex, int& afterVertex, double& sqrDist );
@ -220,7 +220,7 @@ class CORE_EXPORT QgsGeometry
double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minDistPoint, int& beforeVertex );
/**Adds a new ring to this geometry. This makes only sense for polygon and multipolygons.
@return 0 in case of success (ring added), 1 problem with geometry type, 2 ring not closed, \
@return 0 in case of success (ring added), 1 problem with geometry type, 2 ring not closed,
3 ring is not valid geometry, 4 ring not disjoint with existing rings, 5 no polygon found which contained the ring*/
int addRing( const QList<QgsPoint>& ring );

View File

@ -23,9 +23,9 @@
#include <QString>
#ifdef QGISDEBUG
#define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNCTION__, __LINE__);
#define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNCTION__, __LINE__)
#define QgsDebugMsgLevel(str, level) QgsLogger::debug(QString(str), level,\
__FILE__, __FUNCTION__, __LINE__);
__FILE__, __FUNCTION__, __LINE__)
#else
#define QgsDebugMsg(str)
#define QgsDebugMsgLevel(str, level)
@ -100,7 +100,7 @@ class CORE_EXPORT QgsLogger
static void fatal( const QString& msg );
private:
/**Reads the environment variable QGIS_DEBUG and converts it to int. If QGIS_DEBUG is not set,\
/**Reads the environment variable QGIS_DEBUG and converts it to int. If QGIS_DEBUG is not set,
the function returns 1 if QGISDEBUG is defined and 0 if not*/
static int debugLevel();

View File

@ -98,7 +98,7 @@ int QgsPoint::onSegment( const QgsPoint& a, const QgsPoint& b ) const
{
//algorithm from 'graphics GEMS', A. Paeth: 'A Fast 2D Point-on-line test'
if (
fabs(( b.y() - a.y() ) * ( m_x - a.x() ) - ( m_y - a.y() ) * ( b.x() - a.x() ) ) \
fabs(( b.y() - a.y() ) * ( m_x - a.x() ) - ( m_y - a.y() ) * ( b.x() - a.x() ) )
>= qMax( fabs( b.x() - a.x() ), fabs( b.y() - a.y() ) )
)
{

View File

@ -60,7 +60,7 @@ bool QgsProjectFileTransform::updateRevision( QgsProjectVersion newVersion )
void QgsProjectFileTransform::dump()
{
QgsDebugMsg( QString( "Current project file version is %1.%2.%3\n" )
QgsDebugMsg( QString( "Current project file version is %1.%2.%3" )
.arg( mCurrentVersion.majorVersion() )
.arg( mCurrentVersion.minorVersion() )
.arg( mCurrentVersion.subVersion() ) );

View File

@ -2150,14 +2150,14 @@ bool QgsVectorLayer::readXml( QDomNode & layer_node )
enableLabels( true );
}
QgsDebugMsg( "Testing if qgsvectorlayer can call label readXML routine" )
QgsDebugMsg( "Testing if qgsvectorlayer can call label readXML routine" );
QDomNode labelattributesnode = layer_node.namedItem( "labelattributes" );
if ( !labelattributesnode.isNull() )
{
QgsDebugMsg( "qgsvectorlayer calling label readXML routine" )
QgsDebugMsg( "qgsvectorlayer calling label readXML routine" );
mLabel->readXML( labelattributesnode );
}

View File

@ -2098,12 +2098,12 @@ int QgsRasterLayer::getRasterBandNumber( QString const & theBandName )
{
//find out the name of this band
QgsRasterBandStats myRasterBandStats = mRasterStatsList[myIterator];
QgsDebugMsg( "myRasterBandStats.bandName: " + myRasterBandStats.bandName + " :: theBandName: "\
QgsDebugMsg( "myRasterBandStats.bandName: " + myRasterBandStats.bandName + " :: theBandName: "
+ theBandName );
if ( myRasterBandStats.bandName == theBandName )
{
QgsDebugMsg( "********** band " + QString::number( myRasterBandStats.bandNo ) + \
QgsDebugMsg( "********** band " + QString::number( myRasterBandStats.bandNo ) +
" was found in getRasterBandNumber " + theBandName );
return myRasterBandStats.bandNo;
@ -3646,8 +3646,8 @@ QgsRasterLayer::RasterPyramidList QgsRasterLayer::buildRasterPyramidList()
// here is where we check if its a near match:
// we will see if its within 5 cells either side of
//
QgsDebugMsg( "Checking whether " + QString::number( myRasterPyramid.xDim ) + " x " + \
QString::number( myRasterPyramid.yDim ) + " matches " + \
QgsDebugMsg( "Checking whether " + QString::number( myRasterPyramid.xDim ) + " x " +
QString::number( myRasterPyramid.yDim ) + " matches " +
QString::number( myOverviewXDim ) + " x " + QString::number( myOverviewYDim ) );
@ -3838,12 +3838,12 @@ void *QgsRasterLayer::readData( GDALRasterBandH gdalBand, QgsRasterViewPort *vie
GDALDataType type = GDALGetRasterDataType( gdalBand );
int size = GDALGetDataTypeSize( type ) / 8;
QgsDebugMsg( "calling RasterIO with " + \
QString( ", source NW corner: " ) + QString::number( viewPort->rectXOffset ) + \
", " + QString::number( viewPort->rectYOffset ) + \
", source size: " + QString::number( viewPort->clippedWidth ) + \
", " + QString::number( viewPort->clippedHeight ) + \
", dest size: " + QString::number( viewPort->drawableAreaXDim ) + \
QgsDebugMsg( "calling RasterIO with " +
QString( ", source NW corner: " ) + QString::number( viewPort->rectXOffset ) +
", " + QString::number( viewPort->rectYOffset ) +
", source size: " + QString::number( viewPort->clippedWidth ) +
", " + QString::number( viewPort->clippedHeight ) +
", dest size: " + QString::number( viewPort->drawableAreaXDim ) +
", " + QString::number( viewPort->drawableAreaYDim ) );
void *data = VSIMalloc( size * viewPort->drawableAreaXDim * viewPort->drawableAreaYDim );
@ -4669,7 +4669,7 @@ void QgsRasterLayer::populateHistogram( int theBandNo, int theBinCount, bool the
}
}
QgsDebugMsg( ">>>>> Histogram vector now contains " + QString::number( myRasterBandStats.histogramVector->size() ) + \
QgsDebugMsg( ">>>>> Histogram vector now contains " + QString::number( myRasterBandStats.histogramVector->size() ) +
" elements" );
}
@ -4703,8 +4703,8 @@ QgsRasterLayer::QgsRasterLayer( int dummy,
mModified( false )
{
QgsDebugMsg( "(8 arguments) starting. with layer list of " + \
layers.join( ", " ) + " and style list of " + styles.join( ", " ) + " and format of " + \
QgsDebugMsg( "(8 arguments) starting. with layer list of " +
layers.join( ", " ) + " and style list of " + styles.join( ", " ) + " and format of " +
format + " and CRS of " + crs );
mRasterShader = new QgsRasterShader();
@ -4816,8 +4816,8 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
if ( mDataProvider )
{
QgsDebugMsg( "Instantiated the data provider plugin" + \
QString( " with layer list of " ) + layers.join( ", " ) + " and style list of " + styles.join( ", " ) + \
QgsDebugMsg( "Instantiated the data provider plugin" +
QString( " with layer list of " ) + layers.join( ", " ) + " and style list of " + styles.join( ", " ) +
" and format of " + format + " and CRS of " + crs );
if ( mDataProvider->isValid() )
{

View File

@ -144,7 +144,7 @@ void QgsContinuousColorRenderer::renderFeature( QPainter * p, QgsFeature & f, QI
}
brush.setStyle( Qt::SolidPattern );
*img = QgsMarkerCatalogue::instance()->imageMarker( mMinimumSymbol->pointSymbolName(), \
*img = QgsMarkerCatalogue::instance()->imageMarker( mMinimumSymbol->pointSymbolName(),
mMinimumSymbol->pointSize() * widthScale * rasterScaleFactor, pen, brush );
}
else if ( mVectorType == QGis::Line )

View File

@ -192,7 +192,7 @@ void QgsSymbol::setNamedPointSymbol( QString name )
QFile myFile( myTempName );
if ( !myFile.exists() )
{
QgsDebugMsg( "\n\n\n *** Svg Symbol not found on fs ***" )
QgsDebugMsg( "\n\n\n *** Svg Symbol not found on fs ***" );
QgsDebugMsg( "Name: " + name );
//see if we can resolve the problem...
//by using the qgis svg dir from this local machine

View File

@ -73,7 +73,7 @@ class GUI_EXPORT QgisInterface : public QObject
//! Add a raster layer given a raster layer file name
virtual QgsRasterLayer* addRasterLayer( QString rasterLayerPath, QString baseName = QString() ) = 0;
//! Add a WMS layer
virtual QgsRasterLayer* addRasterLayer( const QString& url, const QString& layerName, const QString& providerKey, const QStringList& layers, \
virtual QgsRasterLayer* addRasterLayer( const QString& url, const QString& layerName, const QString& providerKey, const QStringList& layers,
const QStringList& styles, const QString& format, const QString& crs ) = 0;
//! Add a project

View File

@ -1004,9 +1004,11 @@ void QgsMapCanvas::setCanvasColor( const QColor & theColor )
// background of the QGraphicsView
QBrush bgBrush( theColor );
setBackgroundBrush( bgBrush );
/*QPalette palette;
palette.setColor(backgroundRole(), theColor);
setPalette(palette);*/
#if 0
QPalette palette;
palette.setColor( backgroundRole(), theColor );
setPalette( palette );
#endif
// background of QGraphicsScene
mScene->setBackgroundBrush( bgBrush );

View File

@ -110,7 +110,8 @@ void QgsMapOverviewCanvas::reflectChangedExtent()
cXf->transform( &ll );
cXf->transform( &ur );
}
/*
#if 0
// test whether panning widget should be drawn
bool show = false;
if (ur.x() >= 0 && ur.x() < width()) show = true;
@ -122,7 +123,8 @@ void QgsMapOverviewCanvas::reflectChangedExtent()
QgsDebugMsg("panning: extent out of overview area");
mPanningWidget->hide();
return;
}*/
}
#endif
// round values
int x1 = static_cast<int>( ur.x() + 0.5 ), x2 = static_cast<int>( ll.x() + 0.5 );

View File

@ -319,7 +319,7 @@ void QgsRubberBand::updateRect()
{
return;
}
QgsRect r( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY, \
QgsRect r( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY,
it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY );
for ( int i = 0; i < mPoints.size(); ++i )

View File

@ -935,10 +935,10 @@ void QgsGrassNewMapset::setSelectedRegion()
if ( n > 90 ) n = 90;
if ( s < -90 ) s = -90;
/*
#if 0
if ( e > 180 ) e = 180;
if ( w < -180 ) w = 180;
*/
#endif
}
else
{

View File

@ -150,17 +150,19 @@ void QgsGrassSelect::setLocations()
/* TODO: G_is_location() was added to GRASS 6.1 06-05-24,
enable its use after some period (others do update) */
/*
#if 0
if ( QgsGrass::versionMajor() > 6 || QgsGrass::versionMinor() > 0 )
{
if ( !G_is_location( ldpath.toLocal8Bit().constData() ) ) continue;
}
else
{
*/
#endif
QString chf = egisdbase->text() + "/" + d[i] + "/PERMANENT/DEFAULT_WIND";
if ( !QFile::exists( chf ) ) continue;
//}
#if 0
}
#endif
// if type is MAPSET check also if at least one mapset owned by user exists
if ( QgsGrassSelect::type == QgsGrassSelect::MAPSET )

View File

@ -157,7 +157,8 @@ bool MathUtils::circumcenter( Point3D* p1, Point3D* p2, Point3D* p3, Point3D* re
}
}
/*bool MathUtils::circumcenter(Point3D* p1, Point3D* p2, Point3D* p3, Point3D* result)//version imitating the geometric construction
#if 0
bool MathUtils::circumcenter(Point3D* p1, Point3D* p2, Point3D* p3, Point3D* result)//version imitating the geometric construction
{
if(p1&&p2&&p3&&result)
{
@ -191,7 +192,8 @@ bool MathUtils::circumcenter( Point3D* p1, Point3D* p2, Point3D* p3, Point3D* re
cout << "null pointer in method MathUtils::circumcenter" << endl << flush;
return false;
}
}*/
}
#endif // 0
double MathUtils::distPointFromLine( Point3D* thepoint, Point3D* p1, Point3D* p2 )
{
@ -291,7 +293,8 @@ bool MathUtils::inDiametral( Point3D* p1, Point3D* p2, Point3D* point )
return angle( p1, point, p2, point ) > 90;
}
/*bool MathUtils::inDiametral(Point3D* p1, Point3D* p2, Point3D* point)
#if 0
bool MathUtils::inDiametral(Point3D* p1, Point3D* p2, Point3D* point)
{
if(p1&&p2&&point)
{
@ -308,7 +311,8 @@ bool MathUtils::inDiametral( Point3D* p1, Point3D* p2, Point3D* point )
cout << "null pointer in MathUtils::inDiametral" << endl << flush;
return false;
}
}*/
}
#endif // 0
double MathUtils::leftOf( Point3D* thepoint, Point3D* p1, Point3D* p2 )
{

View File

@ -140,11 +140,11 @@ void QgsInterpolationDialog::on_mInputLayerComboBox_currentIndexChanged( const Q
//find out if the layer has 25D type
QGis::WKBTYPE geomType = provider->geometryType();
if ( geomType == QGis::WKBPoint25D || \
geomType == QGis::WKBLineString25D || \
geomType == QGis::WKBPolygon25D || \
geomType == QGis::WKBMultiPoint25D || \
geomType == QGis::WKBMultiLineString25D || \
if ( geomType == QGis::WKBPoint25D ||
geomType == QGis::WKBLineString25D ||
geomType == QGis::WKBPolygon25D ||
geomType == QGis::WKBMultiPoint25D ||
geomType == QGis::WKBMultiLineString25D ||
geomType == QGis::WKBMultiPolygon25D )
{
mUseZCoordCheckBox->setEnabled( true );

View File

@ -30,14 +30,6 @@
#include <QStringList>
#include <QVariant>
namespace qgis
{
namespace plugin
{
namespace ogrconv
{
// GDAL/OGR loaded into private namespace
#include <ogr_api.h>
Dialog::Dialog( QWidget* parent, Qt::WFlags fl )
@ -449,9 +441,3 @@ namespace qgis
inputDstDataset->setText( dst );
}
}
}
} // namespace qgis::plugin::ogrconv

View File

@ -18,8 +18,6 @@
// Qt4
#include <QDialog>
namespace qgis { namespace plugin { namespace ogrconv {
/**
@author Mateusz Loskot
*/
@ -64,6 +62,4 @@ private slots:
void on_comboDstFormats_currentIndexChanged(int index);
};
}}} // namespace qgis::plugin::ogrconv
#endif // QGIS_PLUGIN_OGRCONV_DIALOG_H_INCLUDED

View File

@ -15,8 +15,6 @@
// Qt4
#include <QString>
namespace qgis { namespace plugin { namespace ogrconv {
Format::Format()
{
}
@ -112,6 +110,3 @@ void FormatsRegistry::init()
add(Format("VRT", "Virtual Datasource", Format::eFile));
add(Format("XPLANE", "X-Plane/Flighgear Aeronautical Data", Format::eFile));
}
}}} // namespace qgis::plugin::ogrconv

View File

@ -16,8 +16,6 @@
#include <QMap>
#include <QString>
namespace qgis { namespace plugin { namespace ogrconv {
class Format
{
public:
@ -70,7 +68,4 @@ private:
Format mCache;
};
}}} // namespace qgis::plugin::ogrconv
#endif // QGIS_PLUGIN_OGRCONV_FORMATS_H_INCLUDED

View File

@ -27,9 +27,6 @@
// std
#include <cassert>
namespace qgis { namespace plugin { namespace ogrconv {
// GDAL/OGR loaded into private namesapce
#include <ogr_api.h>
static const char * const sIdent = "$Id$";
@ -144,6 +141,3 @@ QGISEXTERN void unload(QgisPlugin * thePluginPointer)
{
delete thePluginPointer;
}
}}} // namespace qgis::plugin::ogrconv

View File

@ -26,8 +26,6 @@ class QAction;
class QToolBar;
class QgisInterface;
namespace qgis { namespace plugin { namespace ogrconv {
/**
* \class OgrPlugin
* \brief Translates vector layers between formats supported by OGR library.
@ -98,6 +96,4 @@ private:
}; // OgrPlugin
}}} // namespace qgis::plugin::ogrconv
#endif // QGIS_PLUGIN_OGRCONV_PLUGIN_H_INCLUDED

View File

@ -18,14 +18,6 @@
// Qt4
#include <QString>
namespace qgis
{
namespace plugin
{
namespace ogrconv
{
// GDAL/OGR loaded into private namespace
#include <ogr_api.h>
Translator::Translator()
@ -417,8 +409,3 @@ namespace qgis
return ds;
}
}
}
} // namespace qgis::plugin::ogrconv

View File

@ -15,9 +15,6 @@
// Qt4
#include <QString>
namespace qgis { namespace plugin { namespace ogrconv {
// GDAL/OGR loaded into private namespace
#include <ogr_api.h>
class Translator
@ -76,6 +73,4 @@ private:
};
}}} // namespace qgis::plugin::ogrconv
#endif // QGIS_PLUGIN_OGRCONV_TRANSLATOR_H_INCLUDED

View File

@ -60,7 +60,7 @@ class QgsWFSSourceSelect: public QDialog, private Ui::QgsWFSSourceSelectBase
/**Makes a GetCapabilities and returns the typenamse and crs supported by the server.
@param typenames a list of layers provided by the server
@param crs a list of crs supported by the server. The place in the list corresponds to the \
@param crs a list of crs supported by the server. The place in the list corresponds to the
typenames list (means that the crs list at position 0 is a crs for typename at position 0 etc.)
@param title title list
@param abstract textual descriptions for the types

View File

@ -100,14 +100,14 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
// get the extent_ (envelope) of the layer
QgsDebugMsg( "Starting get extent\n" );
QgsDebugMsg( "Starting get extent" );
// TODO: This can be expensive, do we really need it!
extent_ = calloc( sizeof( OGREnvelope ), 1 );
OGR_L_GetExtent( ogrLayer, ( OGREnvelope * ) extent_, TRUE );
QgsDebugMsg( "Finished get extent\n" );
QgsDebugMsg( "Finished get extent" );
// getting the total number of features in the layer
// TODO: This can be expensive, do we really need it!
@ -115,9 +115,9 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
// check the validity of the layer
QgsDebugMsg( "checking validity\n" );
QgsDebugMsg( "checking validity" );
loadFields();
QgsDebugMsg( "Done checking validity\n" );
QgsDebugMsg( "Done checking validity" );
}
else
{

View File

@ -565,9 +565,9 @@ int QgsWFSProvider::guessAttributesFromFile( const QString& uri, QString& geomet
}
attributeChildLocalName = attributeChildElement.localName();
if ( attributeChildLocalName == "Point" || attributeChildLocalName == "LineString" || \
attributeChildLocalName == "Polygon" || attributeChildLocalName == "MultiPoint" || \
attributeChildLocalName == "MultiLineString" || attributeChildLocalName == "MultiPolygon" || \
if ( attributeChildLocalName == "Point" || attributeChildLocalName == "LineString" ||
attributeChildLocalName == "Polygon" || attributeChildLocalName == "MultiPoint" ||
attributeChildLocalName == "MultiLineString" || attributeChildLocalName == "MultiPolygon" ||
attributeChildLocalName == "Surface" || attributeChildLocalName == "MultiSurface" )
{
geometryAttribute = attributeNode.toElement().localName(); //a geometry attribute

View File

@ -86,7 +86,7 @@ class QgsWFSProvider: public QgsVectorDataProvider
results. Posibilities are GET, POST, SOAP*/
void setEncoding( QgsWFSProvider::REQUEST_ENCODING e ) {mEncoding = e;}
/**Makes a GetFeatures, receives the features from the wfs server (as GML), converts them to QgsFeature and \
/**Makes a GetFeatures, receives the features from the wfs server (as GML), converts them to QgsFeature and
stores them in a vector*/
int getFeature( const QString& uri );
@ -95,7 +95,7 @@ class QgsWFSProvider: public QgsVectorDataProvider
void dataReadProgressMessage( QString message );
private slots:
/**Receives the progress signals from QgsWFSData::dataReadProgress, generates a string \
/**Receives the progress signals from QgsWFSData::dataReadProgress, generates a string
and emits the dataReadProgressMessage signal*/
void handleWFSProgressMessage( int done, int total );

View File

@ -241,7 +241,7 @@ QString QgsWmsProvider::imageEncoding() const
void QgsWmsProvider::setImageEncoding( QString const & mimeType )
{
QgsDebugMsg( "Setting image encoding to " + mimeType + "." )
QgsDebugMsg( "Setting image encoding to " + mimeType + "." );
imageMimeType = mimeType;
}
@ -276,10 +276,7 @@ QImage* QgsWmsProvider::draw( QgsRect const & viewExtent, int pixelWidth, int p
QgsDebugMsg( "pixelWidth = " + QString( pixelWidth ) );
QgsDebugMsg( "pixelHeight = " + QString( pixelHeight ) );
#ifdef QGISDEBUG
QgsLogger::debug<QgsRect>( "viewExtent: ", viewExtent, __FILE__, __FUNCTION__, __LINE__ );
#endif
QgsDebugMsg( "viewExtent: " + viewExtent.toString() );
// Can we reuse the previously cached image?
if (
@ -1376,11 +1373,12 @@ void QgsWmsProvider::parseLayer( QDomElement const & e, QgsWmsLayerProperty& lay
}
else if ( e1.tagName() == "LatLonBoundingBox" ) // legacy from earlier versions of WMS
{
// QgsDebugMsg(" LLBB is: '" + e1.attribute("minx") + "'.");
// QgsDebugMsg(" LLBB is: '" + e1.attribute("miny") + "'.");
// QgsDebugMsg(" LLBB is: '" + e1.attribute("maxx") + "'.");
// QgsDebugMsg(" LLBB is: '" + e1.attribute("maxy") + "'.");
#if 0
QgsDebugMsg( " LLBB is: '" + e1.attribute( "minx" ) + "'." );
QgsDebugMsg( " LLBB is: '" + e1.attribute( "miny" ) + "'." );
QgsDebugMsg( " LLBB is: '" + e1.attribute( "maxx" ) + "'." );
QgsDebugMsg( " LLBB is: '" + e1.attribute( "maxy" ) + "'." );
#endif
layerProperty.ex_GeographicBoundingBox = QgsRect(
e1.attribute( "minx" ).toDouble(),
@ -1595,9 +1593,9 @@ void QgsWmsProvider::parseServiceException( QDomElement const & e )
{
mError = tr( "Request contains a CRS not offered by the server for one or more of the Layers in the request." );
}
else if ( seCode == "InvalidCRS" ) // legacy WMS < 1.3.0
else if ( seCode == "InvalidSRS" ) // legacy WMS < 1.3.0
{
mError = tr( "Request contains a CRS not offered by the server for one or more of the Layers in the request." );
mError = tr( "Request contains a SRS not offered by the server for one or more of the Layers in the request." );
}
else if ( seCode == "LayerNotDefined" )
{