Skip to content
Permalink
Browse files
Faster build times with fwd include
  • Loading branch information
elpaso committed May 10, 2019
1 parent 425f672 commit 0081ad0
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
@@ -20,6 +20,7 @@ email : marco.hugentobler at sourcepole dot com
#include "qgsmaptopixel.h"
#include "qgspoint.h"
#include "qgsgeometrycollection.h"
#include "nlohmann/json.hpp"

#include <limits>
#include <QTransform>
@@ -158,6 +159,11 @@ QString QgsAbstractGeometry::asJson( int precision )
return QString::fromStdString( asJsonObject( precision ).dump() );
}

json QgsAbstractGeometry::asJsonObject( int precision ) const
{
Q_UNUSED( precision ); return nullptr;
}

QgsPoint QgsAbstractGeometry::centroid() const
{
// http://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon
@@ -26,7 +26,7 @@ email : marco.hugentobler at sourcepole dot com
#include "qgswkbptr.h"

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

@@ -297,7 +297,7 @@ class CORE_EXPORT QgsAbstractGeometry
* \note not available in Python bindings
* \since QGIS 3.10
*/
virtual json asJsonObject( int precision = 17 ) const SIP_SKIP { Q_UNUSED( precision ); return nullptr; }
virtual json asJsonObject( int precision = 17 ) SIP_SKIP const;


//render pipeline
@@ -27,7 +27,6 @@ email : marco.hugentobler at sourcepole dot com
#include <QVector>
#include <QRegularExpression>


#include "nlohmann/json.hpp"

QVector<QgsLineString *> QgsGeometryUtils::extractLineStrings( const QgsAbstractGeometry *geom )
@@ -277,12 +277,6 @@ QDomElement QgsPoint::asGml3( QDomDocument &doc, int precision, const QString &n
return elemPoint;
}

/***************************************************************************
* This class is considered CRITICAL and any change MUST be accompanied with
* full unit tests.
* See details in QEP #17
****************************************************************************/


json QgsPoint::asJsonObject( int precision ) const
{
@@ -319,6 +313,13 @@ void QgsPoint::clear()
clearCache();
}


/***************************************************************************
* This class is considered CRITICAL and any change MUST be accompanied with
* full unit tests.
* See details in QEP #17
****************************************************************************/

void QgsPoint::transform( const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection d, bool transformZ )
{
clearCache();
@@ -26,6 +26,7 @@
#include "qgsfieldformatterregistry.h"
#include "qgsfieldformatter.h"
#include "qgsapplication.h"
#include "nlohmann/json.hpp"

#include <QJsonDocument>
#include <QJsonArray>
@@ -24,7 +24,7 @@


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

@@ -91,6 +91,8 @@
#include "qgsunittypes.h"
#include <QUrl>

#include"nlohmann/json.hpp"

namespace QgsWms
{
QgsRenderer::QgsRenderer( const QgsWmsRenderContext &context )
@@ -17,7 +17,7 @@
#include <qgsjsonutils.h>
#include "qgsvectorlayer.h"
#include "qgsfeature.h"

#include"nlohmann/json.hpp"

class TestQgsJsonUtils : public QObject
{

0 comments on commit 0081ad0

Please sign in to comment.