Skip to content
Permalink
Browse files

fix build

  • Loading branch information
jef-n committed May 12, 2019
1 parent f56429a commit e9a80d67999e6b9301436dcecc13d8ebc966428e
@@ -12,7 +12,6 @@




typedef QVector< QgsPoint > QgsPointSequence;
typedef QVector< QVector< QgsPoint > > QgsRingSequence;
typedef QVector< QVector< QVector< QgsPoint > > > QgsCoordinateSequence;
@@ -12,7 +12,6 @@




class QgsJsonExporter
{
%Docstring
@@ -20,8 +20,8 @@ email : marco.hugentobler at sourcepole dot com
#include "qgsmaptopixel.h"
#include "qgspoint.h"
#include "qgsgeometrycollection.h"
#include "nlohmann/json.hpp"

#include <nlohmann/json.hpp>
#include <limits>
#include <QTransform>

@@ -17,7 +17,6 @@ email : marco.hugentobler at sourcepole dot com
#define QGSABSTRACTGEOMETRYV2

#include <functional>

#include <QString>

#include "qgis_core.h"
@@ -26,7 +25,7 @@ email : marco.hugentobler at sourcepole dot com
#include "qgswkbptr.h"

#ifndef SIP_RUN
#include "nlohmann/json_fwd.hpp"
#include <nlohmann/json_fwd.hpp>
using json = nlohmann::json;
#endif

@@ -24,11 +24,12 @@
#include "qgspoint.h"
#include "qgswkbptr.h"
#include "qgslogger.h"

#include <QJsonObject>
#include <QPainter>
#include <QPainterPath>
#include <memory>
#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>

QgsCircularString::QgsCircularString()
{
@@ -21,11 +21,12 @@
#include "qgsgeometryutils.h"
#include "qgslinestring.h"
#include "qgswkbptr.h"

#include <QJsonObject>
#include <QPainter>
#include <QPainterPath>
#include <memory>
#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>

QgsCompoundCurve::QgsCompoundCurve()
{
@@ -24,13 +24,13 @@
#include "qgspolygon.h"
#include "qgswkbptr.h"
#include "qgsmulticurve.h"

#include <QJsonArray>
#include <QJsonObject>
#include <QPainter>
#include <QPainterPath>
#include <memory>

#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>

QgsCurvePolygon::QgsCurvePolygon()
{
@@ -17,6 +17,7 @@ email : morb at ozemail dot com dot au
#include <cstdarg>
#include <cstdio>
#include <cmath>
#include <nlohmann/json.hpp>

#include "qgis.h"
#include "qgsgeometry.h"
@@ -47,8 +48,6 @@ email : morb at ozemail dot com dot au
#include "qgscircle.h"
#include "qgscurve.h"

#include "nlohmann/json.hpp"

struct QgsGeometryPrivate
{
QgsGeometryPrivate(): ref( 1 ) {}
@@ -37,7 +37,7 @@ email : morb at ozemail dot com dot au
#include "qgsfeatureid.h"

#ifndef SIP_RUN
#include "nlohmann/json_fwd.hpp"
#include <nlohmann/json_fwd.hpp>
using json = nlohmann::json;
#endif

@@ -27,7 +27,8 @@ email : marco.hugentobler at sourcepole dot com
#include "qgsmultipolygon.h"
#include "qgswkbptr.h"
#include "qgsgeos.h"
#include "nlohmann/json.hpp"

#include <nlohmann/json.hpp>
#include <memory>

QgsGeometryCollection::QgsGeometryCollection()
@@ -26,8 +26,7 @@ email : marco.hugentobler at sourcepole dot com
#include <QStringList>
#include <QVector>
#include <QRegularExpression>

#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>

QVector<QgsLineString *> QgsGeometryUtils::extractLineStrings( const QgsAbstractGeometry *geom )
{
@@ -23,8 +23,8 @@
#include "qgsmaptopixel.h"
#include "qgswkbptr.h"
#include "qgslinesegment.h"
#include "nlohmann/json.hpp"

#include <nlohmann/json.hpp>
#include <cmath>
#include <memory>
#include <QPainter>
@@ -21,9 +21,10 @@ email : marco.hugentobler at sourcepole dot com
#include "qgsgeometryutils.h"
#include "qgslinestring.h"
#include "qgsmultipoint.h"

#include <QJsonObject>
#include <memory>
#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>

QgsMultiCurve::QgsMultiCurve()
{
@@ -21,8 +21,8 @@ email : marco.hugentobler at sourcepole dot com
#include "qgsgeometryutils.h"
#include "qgslinestring.h"
#include "qgsmulticurve.h"
#include "nlohmann/json.hpp"

#include <nlohmann/json.hpp>
#include <QJsonObject>

QgsMultiLineString::QgsMultiLineString()
@@ -21,8 +21,7 @@ email : marco.hugentobler at sourcepole dot com

#include <QJsonArray>
#include <QJsonObject>

#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>

QgsMultiPoint::QgsMultiPoint()
{
@@ -21,8 +21,9 @@ email : marco.hugentobler at sourcepole dot com
#include "qgspolygon.h"
#include "qgscurvepolygon.h"
#include "qgsmultilinestring.h"
#include "nlohmann/json.hpp"

#include <QJsonObject>
#include <nlohmann/json.hpp>

QgsMultiPolygon::QgsMultiPolygon()
{
@@ -22,9 +22,9 @@ email : marco.hugentobler at sourcepole dot com
#include "qgspolygon.h"
#include "qgscurvepolygon.h"
#include "qgsmulticurve.h"
#include "nlohmann/json.hpp"

#include <QJsonObject>
#include <nlohmann/json.hpp>

QgsMultiSurface::QgsMultiSurface()
{
@@ -28,8 +28,7 @@
#include <QRegularExpression>
#include <QJsonObject>
#include <QJsonArray>

#include "nlohmann/json.hpp"
#include <nlohmann/json.hpp>

/***************************************************************************
* This class is considered CRITICAL and any change MUST be accompanied with
@@ -26,10 +26,10 @@
#include "qgsfieldformatterregistry.h"
#include "qgsfieldformatter.h"
#include "qgsapplication.h"
#include "nlohmann/json.hpp"

#include <QJsonDocument>
#include <QJsonArray>
#include <nlohmann/json.hpp>

QgsJsonExporter::QgsJsonExporter( QgsVectorLayer *vectorLayer, int precision )
: mPrecision( precision )
@@ -22,9 +22,8 @@
#include "qgscoordinatetransform.h"
#include "qgsfields.h"


#ifndef SIP_RUN
#include "nlohmann/json_fwd.hpp"
#include <nlohmann/json_fwd.hpp>
using json = nlohmann::json;
#endif

@@ -3,6 +3,7 @@ ADD_EXECUTABLE(crssync main.cpp)
INCLUDE_DIRECTORIES(
../core
../core/geometry
${CMAKE_SOURCE_DIR}/external
${CMAKE_BINARY_DIR}/src/core
)
INCLUDE_DIRECTORIES(SYSTEM
@@ -100,6 +100,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/src/core/raster
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/customwidgets
${CMAKE_SOURCE_DIR}/external
${CMAKE_CURRENT_BINARY_DIR}/../ui
)
INCLUDE_DIRECTORIES(SYSTEM
@@ -69,6 +69,8 @@
#include <QStringList>
#include <QTemporaryFile>
#include <QDir>
#include <QUrl>
#include <nlohmann/json.hpp>

//for printing
#include "qgslayoutatlas.h"
@@ -89,9 +91,6 @@
#include "qgsfeaturefilterprovidergroup.h"
#include "qgsogcutils.h"
#include "qgsunittypes.h"
#include <QUrl>

#include"nlohmann/json.hpp"

namespace QgsWms
{
@@ -14,10 +14,12 @@
***************************************************************************/

#include "qgstest.h"

#include <qgsjsonutils.h>
#include <nlohmann/json.hpp>

#include "qgsvectorlayer.h"
#include "qgsfeature.h"
#include"nlohmann/json.hpp"

class TestQgsJsonUtils : public QObject
{
@@ -131,10 +133,10 @@ class TestQgsJsonUtils : public QObject
QgsJsonExporter exporter { &vl };

const auto expectedJson { QStringLiteral( "{\"bbox\":[[1.12,1.12,5.45,5.33]],\"geometry\":{\"coordinates\":"
"[[[1.12,1.34],[5.45,1.12],[5.34,5.33],[1.56,5.2],[1.12,1.34]],"
"[[2.0,2.0],[3.0,2.0],[3.0,3.0],[2.0,3.0],[2.0,2.0]]],\"type\":\"Polygon\"}"
",\"id\":0,\"properties\":{\"flddbl\":2.0,\"fldint\":1,\"fldtxt\":\"a value\"}"
",\"type\":\"Feature\"}" ) };
"[[[1.12,1.34],[5.45,1.12],[5.34,5.33],[1.56,5.2],[1.12,1.34]],"
"[[2.0,2.0],[3.0,2.0],[3.0,3.0],[2.0,3.0],[2.0,2.0]]],\"type\":\"Polygon\"}"
",\"id\":0,\"properties\":{\"flddbl\":2.0,\"fldint\":1,\"fldtxt\":\"a value\"}"
",\"type\":\"Feature\"}" ) };

const auto j { exporter.exportFeatureToJsonObject( feature ) };
QCOMPARE( QString::fromStdString( j.dump() ), expectedJson );

0 comments on commit e9a80d6

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