Skip to content

Commit

Permalink
Optimise some headers for compile speed
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 7, 2015
1 parent 7d4eb8b commit fcaf560
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 36 deletions.
1 change: 1 addition & 0 deletions src/core/composer/qgscomposerhtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "qgsnetworkcontentfetcher.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsdistancearea.h"

#include <QCoreApplication>
#include <QPainter>
Expand Down
1 change: 1 addition & 0 deletions src/core/composer/qgscomposerlabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "qgscomposermodel.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsdistancearea.h"

#include <QCoreApplication>
#include <QDate>
Expand Down
7 changes: 3 additions & 4 deletions src/core/qgsdatadefined.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
#ifndef QGSDATADEFINED_H
#define QGSDATADEFINED_H

#include "qgsfield.h"
#include "qgsvectorlayer.h"

#include <QStringList>
#include <QDomElement>
#include <QMap>

class QgsExpression;

class QgsVectorLayer;

/** \ingroup core
* \class QgsDataDefined
Expand Down
13 changes: 6 additions & 7 deletions src/core/qgsexpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
#include <QList>
#include <QDomDocument>

#include "qgsfield.h"
#include "qgsdistancearea.h"

class QgsFeature;
class QgsGeometry;
class QgsOgcUtils;
class QgsVectorLayer;
class QgsVectorDataProvider;

class QgsField;
class QgsFields;
class QgsDistanceArea;
class QDomElement;

/**
Expand Down Expand Up @@ -522,10 +521,10 @@ class CORE_EXPORT QgsExpression

virtual QStringList referencedColumns() const override { QStringList lst( mNode->referencedColumns() ); foreach ( Node* n, mList->list() ) lst.append( n->referencedColumns() ); return lst; }
virtual bool needsGeometry() const override { bool needs = false; foreach ( Node* n, mList->list() ) needs |= n->needsGeometry(); return needs; }
virtual void accept( Visitor& v ) const override { v.visit( *this ); }
virtual void accept( Visitor& v ) const override { v.visit( *this ); }

protected:
Node* mNode;
protected:
Node* mNode;
NodeList* mList;
bool mNotIn;
};
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsmaprenderercustompainterjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qgsmaplayerregistry.h"
#include "qgsmaplayerrenderer.h"
#include "qgspallabeling.h"
#include "qgsvectorlayer.h"

QgsMapRendererCustomPainterJob::QgsMapRendererCustomPainterJob( const QgsMapSettings& settings, QPainter* painter )
: QgsMapRendererJob( settings )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaprendererjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "qgsmaprenderercache.h"
#include "qgspallabeling.h"
#include "qgsvectorlayerrenderer.h"

#include "qgsvectorlayer.h"

QgsMapRendererJob::QgsMapRendererJob( const QgsMapSettings& settings )
: mSettings( settings )
Expand Down
35 changes: 15 additions & 20 deletions src/core/qgspallabeling.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,17 @@
#ifndef QGSPALLABELING_H
#define QGSPALLABELING_H

class QFontMetricsF;
class QPainter;
class QPicture;
class QgsGeometry;
class QgsMapRenderer;
class QgsRectangle;
class QgsCoordinateTransform;
class QgsLabelSearchTree;

class QgsMapSettings;

#include <QString>
#include <QFont>
#include <QFontDatabase>
#include <QColor>
#include <QHash>
#include <QList>
#include <QRectF>
#include "qgspoint.h"
#include "qgsmaprenderer.h" // definition of QgsLabelingEngineInterface
#include "qgsdiagramrendererv2.h"
#include "qgsmapunitscale.h"

namespace pal
{
Expand All @@ -47,19 +40,21 @@ namespace pal
class LabelPosition;
}

class QgsRectangle;
class QgsMapToPixel;
class QgsFeature;

#include "qgspoint.h"
#include "qgsrectangle.h"
#include "qgsmaprenderer.h" // definition of QgsLabelingEngineInterface
#include "qgsexpression.h"
#include "qgsdatadefined.h"
#include "qgsdiagramrendererv2.h"
#include "qgsmapunitscale.h"

class QgsPalGeometry;
class QgsVectorLayer;
class QgsDataDefined;
class QgsExpression;
class QFontMetricsF;
class QPainter;
class QPicture;
class QgsGeometry;
class QgsMapRenderer;
class QgsCoordinateTransform;
class QgsLabelSearchTree;
class QgsMapSettings;

class CORE_EXPORT QgsPalLayerSettings
{
Expand Down
5 changes: 2 additions & 3 deletions src/gui/qgsdatadefinedbutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
#ifndef QGSDATADEFINEDBUTTON_H
#define QGSDATADEFINEDBUTTON_H

#include <qgsfield.h>
#include <qgsdatadefined.h>

#include "qgsfield.h"
#include <QFlags>
#include <QMap>
#include <QPointer>
#include <QToolButton>

class QgsVectorLayer;
class QgsDataDefined;

/** \ingroup gui
* \class QgsDataDefinedButton
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "qgssymbollayerv2utils.h"
#include "qgsvectorcolorrampv2.h"
#include "qgsvectorgradientcolorrampv2dialog.h"

#include "qgsdatadefined.h"
#include "qgsstylev2.h" //for symbol selector dialog

#include "qgsapplication.h"
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposerobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qgscomposition.h"
#include "qgscompositionchecker.h"
#include "qgsdatadefined.h"
#include "qgsexpression.h"
#include <QObject>
#include <QtTest/QtTest>

Expand Down

0 comments on commit fcaf560

Please sign in to comment.