Skip to content

Commit

Permalink
Revert "Fix doxygen warning"
Browse files Browse the repository at this point in the history
This reverts commit 9e1a235.
  • Loading branch information
nyalldawson committed Jan 27, 2016
1 parent 9e1a235 commit 59f418b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 51 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsexpressioncontext.sip
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsexpressioncontext.h
Expand Up @@ -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;
Expand Down
51 changes: 2 additions & 49 deletions tests/src/core/testqgsmaprenderer.cpp
Expand Up @@ -38,7 +38,6 @@
#include <qgsapplication.h>
#include <qgsproviderregistry.h>
#include <qgsmaplayerregistry.h>
#include "qgssinglesymbolrendererv2.h"

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

Expand All @@ -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);
};


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 59f418b

Please sign in to comment.