Skip to content
Permalink
Browse files

Revert "Fix doxygen warning"

This reverts commit 9e1a235.
  • Loading branch information
nyalldawson committed Jan 27, 2016
1 parent 9e1a235 commit 59f418b7639cfa66327c1c72d7569c1def2e95e8
Showing with 4 additions and 51 deletions.
  1. +1 −1 python/core/qgsexpressioncontext.sip
  2. +1 −1 src/core/qgsexpressioncontext.h
  3. +2 −49 tests/src/core/testqgsmaprenderer.cpp
@@ -392,7 +392,7 @@ class QgsExpressionContext
static const QString EXPR_FIELDS;
//! Inbuilt variable name for feature storage
static const QString EXPR_FEATURE;
//! Inbuilt variable name for value original value variable
//! Inbuilt variable name for @value original value variable
static const QString EXPR_ORIGINAL_VALUE;
//! Inbuilt variable name for symbol color variable
static const QString EXPR_SYMBOL_COLOR;
@@ -427,7 +427,7 @@ class CORE_EXPORT QgsExpressionContext
static const QString EXPR_FIELDS;
//! Inbuilt variable name for feature storage
static const QString EXPR_FEATURE;
//! Inbuilt variable name for value original value variable
//! Inbuilt variable name for @value original value variable
static const QString EXPR_ORIGINAL_VALUE;
//! Inbuilt variable name for symbol color variable
static const QString EXPR_SYMBOL_COLOR;
@@ -38,7 +38,6 @@
#include <qgsapplication.h>
#include <qgsproviderregistry.h>
#include <qgsmaplayerregistry.h>
#include "qgssinglesymbolrendererv2.h"

//qgs unit test utility class
#include "qgsrenderchecker.h"
@@ -55,9 +54,8 @@ class TestQgsMapRenderer : public QObject
public:
TestQgsMapRenderer()
: mError( QgsVectorFileWriter::NoError )
, mMapSettings( nullptr )
, mpPolysLayer( nullptr )
, mPointsLayer( nullptr )
, mMapSettings( 0 )
, mpPolysLayer( 0 )
{
}

@@ -81,18 +79,14 @@ class TestQgsMapRenderer : public QObject
void testFourAdjacentTiles_data();
void testFourAdjacentTiles();

void testSymbolsOnEdgeOfExtent(); //tests that large symbols just outside the extent will be shown

private:
QString mEncoding;
QgsVectorFileWriter::WriterError mError;
QgsCoordinateReferenceSystem mCRS;
QgsFields mFields;
QgsMapSettings *mMapSettings;
QgsMapLayer * mpPolysLayer;
QgsVectorLayer* mPointsLayer;
QString mReport;
bool imageCheck(QgsMapSettings mapSettings, const QString& theTestType);
};


@@ -189,14 +183,6 @@ void TestQgsMapRenderer::initTestCase()
mpPolysLayer = new QgsVectorLayer( myPolyFileInfo.filePath(),
myPolyFileInfo.completeBaseName(), "ogr" );
QVERIFY( mpPolysLayer->isValid() );


QString pointFileName = myTestDataDir + "regular_points.geojson";
QFileInfo pointFileInfo( pointFileName );
mPointsLayer = new QgsVectorLayer( pointFileInfo.filePath(),
pointFileInfo.completeBaseName(), "ogr" );
QVERIFY( mPointsLayer->isValid() );

// Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers( QList<QgsMapLayer *>() << mpPolysLayer );
// add the test layer to the maprender
@@ -346,39 +332,6 @@ void TestQgsMapRenderer::testFourAdjacentTiles()
QVERIFY( result );
}

void TestQgsMapRenderer::testSymbolsOnEdgeOfExtent()
{
mReport += "<h2>Large symbols on edge of extent</h2>\n";

QgsMapSettings ms;
ms.setLayers( QStringList() << mPointsLayer->id() );
ms.setExtent( mPointsLayer->extent() );
mMapSettings->setDestinationCrs( QgsCoordinateReferenceSystem( "EPSG:3005" ) );

// ms.setExtent( QgsRectangle ( 778780, 965073, 780900, 970333 ) );

//BIG symbol
QgsStringMap properties;
properties.insert( "color", "0,0,0,255" );
properties.insert( "name", "circle" );
properties.insert( "size", "20.0" );
properties.insert( "outline_style", "no" );
QgsMarkerSymbolV2* pointSymbol = QgsMarkerSymbolV2::createSimple( properties );
mPointsLayer->setRendererV2( new QgsSingleSymbolRendererV2( pointSymbol ) );

QVERIFY( imageCheck( ms, "singlesymbol_orderby" ) );
}

bool TestQgsMapRenderer::imageCheck( QgsMapSettings mapSettings, const QString& theTestType )
{
mapSettings.setOutputDpi( 96 );
QgsRenderChecker myChecker;
myChecker.setControlName( "expected_" + theTestType );
myChecker.setMapSettings( mapSettings );
bool myResultFlag = myChecker.runTest( theTestType, 30 );
mReport += myChecker.report();
return myResultFlag;
}

QTEST_MAIN( TestQgsMapRenderer )
#include "testqgsmaprenderer.moc"

0 comments on commit 59f418b

Please sign in to comment.
You can’t perform that action at this time.