Skip to content

Commit

Permalink
Merge pull request #7793 from m-kuhn/vectorlayerinclude
Browse files Browse the repository at this point in the history
Only include qgsvectorlayer.h where required
  • Loading branch information
m-kuhn committed Sep 5, 2018
2 parents f38400d + 4445c38 commit 4b411e0
Show file tree
Hide file tree
Showing 123 changed files with 199 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .ci/travis/code_layout/script.sh
Expand Up @@ -20,6 +20,6 @@ pushd build
export CTEST_BUILD_DIR=${TRAVIS_BUILD_DIR}
export CTEST_BUILD_COMMAND="/usr/bin/make -j3 -i -k"

python3 "${TRAVIS_BUILD_DIR}/.ci/travis/scripts/ctest2travis.py" xvfb-run ctest -V --output-on-failure -S "${TRAVIS_BUILD_DIR}/.ci/travis/travis.ctest"
python3 "${TRAVIS_BUILD_DIR}/.ci/travis/scripts/ctest2travis.py" xvfb-run ctest -VV --output-on-failure -S "${TRAVIS_BUILD_DIR}/.ci/travis/travis.ctest"

popd
Expand Up @@ -7,6 +7,7 @@
************************************************************************/



class QgsLayoutReportContext : QObject
{
%Docstring
Expand Down
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsjsonutils.sip.in
Expand Up @@ -10,6 +10,7 @@




class QgsJsonExporter
{
%Docstring
Expand Down
Expand Up @@ -11,6 +11,7 @@




class QgsVectorLayerUndoPassthroughCommand : QgsVectorLayerUndoCommand
{
%Docstring
Expand Down
2 changes: 2 additions & 0 deletions python/gui/auto_generated/qgsfieldvalueslineedit.sip.in
Expand Up @@ -10,6 +10,8 @@





class QgsFieldValuesLineEdit: QgsFilterLineEdit
{
%Docstring
Expand Down
Expand Up @@ -9,6 +9,7 @@




class QgsNewAuxiliaryLayerDialog: QDialog
{
%Docstring
Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmextractbylocation.cpp
Expand Up @@ -17,6 +17,7 @@

#include "qgsalgorithmextractbylocation.h"
#include "qgsgeometryengine.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmimportphotos.cpp
Expand Up @@ -17,6 +17,7 @@

#include "qgsalgorithmimportphotos.h"
#include "qgsogrutils.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmmergevector.cpp
Expand Up @@ -16,6 +16,7 @@
***************************************************************************/

#include "qgsalgorithmmergevector.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmpackage.cpp
Expand Up @@ -19,6 +19,7 @@
#include "qgsgeometryengine.h"
#include "qgsogrutils.h"
#include "qgsvectorfilewriter.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
Expand Up @@ -16,6 +16,7 @@
***************************************************************************/

#include "qgsalgorithmsaveselectedfeatures.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/vector/geometry_checker/qgsgeometrycheck.cpp
Expand Up @@ -17,6 +17,7 @@
#include "qgscurvepolygon.h"
#include "qgsgeometrycheck.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"

QgsGeometryCheckerContext::QgsGeometryCheckerContext( int _precision, const QgsCoordinateReferenceSystem &_mapCrs, const QMap<QString, QgsFeaturePool *> &_featurePools )
: tolerance( std::pow( 10, -_precision ) )
Expand Down
1 change: 0 additions & 1 deletion src/analysis/vector/geometry_checker/qgsgeometrycheck.h
Expand Up @@ -23,7 +23,6 @@
#include <QStringList>
#include "qgis_analysis.h"
#include "qgsfeature.h"
#include "qgsvectorlayer.h"
#include "geometry/qgsgeometry.h"
#include "qgsgeometrycheckerutils.h"

Expand Down
Expand Up @@ -18,6 +18,7 @@
#include "qgsgeometrycheck.h"
#include "qgsfeaturepool.h"
#include "qgsproject.h"
#include "qgsvectorlayer.h"

#include <QtConcurrentMap>
#include <QFutureWatcher>
Expand Down
19 changes: 18 additions & 1 deletion src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp
Expand Up @@ -22,6 +22,8 @@
#include "qgsgeos.h"
#include "qgsgeometrycollection.h"
#include "qgssurface.h"
#include "qgsvectorlayer.h"

#include <qmath.h>

namespace QgsGeometryCheckerUtils
Expand All @@ -45,7 +47,22 @@ namespace QgsGeometryCheckerUtils
double LayerFeature::layerToMapUnits() const { return mFeaturePool->getLayerToMapUnits(); }
const QgsCoordinateTransform &LayerFeature::layerToMapTransform() const { return mFeaturePool->getLayerToMapTransform(); }

/////////////////////////////////////////////////////////////////////////////
QString LayerFeature::id() const
{
return QString( "%1:%2" ).arg( layer().name() ).arg( mFeature.id() );
}

bool LayerFeature::operator==( const LayerFeature &other ) const
{
return layer().id() == other.layer().id() && feature().id() == other.feature().id();
}

bool LayerFeature::operator!=( const LayerFeature &other ) const
{
return layer().id() != other.layer().id() || feature().id() != other.feature().id();
}

/////////////////////////////////////////////////////////////////////////////

LayerFeatures::iterator::iterator( const QStringList::const_iterator &layerIt, const LayerFeatures *parent )
: mLayerIt( layerIt )
Expand Down
Expand Up @@ -20,7 +20,6 @@
#define QGS_GEOMETRYCHECKERUTILS_H

#include "qgsfeature.h"
#include "qgsvectorlayer.h"
#include "geometry/qgsabstractgeometry.h"
#include "geometry/qgspoint.h"
#include <qmath.h>
Expand All @@ -41,9 +40,9 @@ namespace QgsGeometryCheckerUtils
const QgsCoordinateTransform &layerToMapTransform() const;
const QgsAbstractGeometry *geometry() const { return mGeometry; }
QString geometryCrs() const { return mMapCrs ? layerToMapTransform().destinationCrs().authid() : layerToMapTransform().sourceCrs().authid(); }
QString id() const { return QString( "%1:%2" ).arg( layer().name() ).arg( mFeature.id() ); }
bool operator==( const LayerFeature &other ) const { return layer().id() == other.layer().id() && feature().id() == other.feature().id(); }
bool operator!=( const LayerFeature &other ) const { return layer().id() != other.layer().id() || feature().id() != other.feature().id(); }
QString id() const;
bool operator==( const LayerFeature &other ) const;
bool operator!=( const LayerFeature &other ) const;

private:
const QgsFeaturePool *mFeaturePool;
Expand Down
Expand Up @@ -16,6 +16,7 @@
#include "qgsgeometryengine.h"
#include "qgsgeometrycontainedcheck.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"


void QgsGeometryContainedCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &messages, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
Expand Down
Expand Up @@ -19,6 +19,7 @@
#define QGS_GEOMETRY_COVER_CHECK_H

#include "qgsgeometrycheck.h"
#include "qgsvectorlayer.h"

class ANALYSIS_EXPORT QgsGeometryContainedCheckError : public QgsGeometryCheckError
{
Expand Down
Expand Up @@ -15,6 +15,7 @@

#include "qgsgeometrydanglecheck.h"
#include "qgslinestring.h"
#include "qgsvectorlayer.h"

void QgsGeometryDangleCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &/*messages*/, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
{
Expand Down
Expand Up @@ -18,6 +18,7 @@
#include "qgsspatialindex.h"
#include "qgsgeometry.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"

QString QgsGeometryDuplicateCheckError::duplicatesString( const QMap<QString, QgsFeaturePool *> &featurePools, const QMap<QString, QList<QgsFeatureId>> &duplicates )
{
Expand Down
Expand Up @@ -17,7 +17,7 @@
#include "qgsgeometryengine.h"
#include "qgsproject.h"
#include "qgsspatialindex.h"

#include "qgsvectorlayer.h"

QgsGeometryFollowBoundariesCheck::QgsGeometryFollowBoundariesCheck( QgsGeometryCheckerContext *context, QgsVectorLayer *checkLayer )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::PolygonGeometry}, context )
Expand Down
2 changes: 2 additions & 0 deletions src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp
Expand Up @@ -17,6 +17,8 @@
#include "qgsgeometrygapcheck.h"
#include "qgsgeometrycollection.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"

#include "geos_c.h"

void QgsGeometryGapCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &messages, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
Expand Down
Expand Up @@ -15,6 +15,7 @@

#include "qgsgeometrylineintersectioncheck.h"
#include "qgslinestring.h"
#include "qgsvectorlayer.h"

void QgsGeometryLineIntersectionCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &/*messages*/, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
{
Expand Down
Expand Up @@ -19,6 +19,7 @@
#define QGS_GEOMETRY_OVERLAP_CHECK_H

#include "qgsgeometrycheck.h"
#include "qgsvectorlayer.h"

class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckError
{
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutmapgridwidget.cpp
Expand Up @@ -26,6 +26,7 @@
#include "qgslayout.h"
#include "qgsmapsettings.h"
#include "qgsexpressionbuilderdialog.h"
#include "qgsvectorlayer.h"

QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, QgsLayoutItemMap *map )
: QgsLayoutItemBaseWidget( nullptr, mapGrid )
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutpagepropertieswidget.cpp
Expand Up @@ -20,6 +20,7 @@
#include "qgslayout.h"
#include "qgslayoutpagecollection.h"
#include "qgslayoutundostack.h"
#include "qgsvectorlayer.h"

QgsLayoutPagePropertiesWidget::QgsLayoutPagePropertiesWidget( QWidget *parent, QgsLayoutItem *layoutItem )
: QgsLayoutItemBaseWidget( parent, layoutItem )
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutpolygonwidget.cpp
Expand Up @@ -21,6 +21,7 @@
#include "qgssymbollayerutils.h"
#include "qgslayoutitemregistry.h"
#include "qgslayoutundostack.h"
#include "qgsvectorlayer.h"

QgsLayoutPolygonWidget::QgsLayoutPolygonWidget( QgsLayoutItemPolygon *polygon )
: QgsLayoutItemBaseWidget( nullptr, polygon )
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutpolylinewidget.cpp
Expand Up @@ -21,6 +21,7 @@
#include "qgslayoutitemregistry.h"
#include "qgslayout.h"
#include "qgslayoutundostack.h"
#include "qgsvectorlayer.h"

#include <QButtonGroup>
#include <QFileDialog>
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutshapewidget.cpp
Expand Up @@ -20,6 +20,7 @@
#include "qgslayoutitemshape.h"
#include "qgslayout.h"
#include "qgslayoutundostack.h"
#include "qgsvectorlayer.h"

QgsLayoutShapeWidget::QgsLayoutShapeWidget( QgsLayoutItemShape *shape )
: QgsLayoutItemBaseWidget( nullptr, shape )
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsattributesformproperties.h
Expand Up @@ -30,7 +30,6 @@
#include <QHBoxLayout>
#include <QFormLayout>

#include "qgsvectorlayer.h"
#include "ui_qgsattributesformproperties.h"
#include "qgis_app.h"
#include "qgsaddattrdialog.h"
Expand Down
1 change: 1 addition & 0 deletions src/app/qgslayercapabilitiesmodel.cpp
Expand Up @@ -19,6 +19,7 @@

#include "qgslayertree.h"
#include "qgslayertreemodel.h"
#include "qgsvectorlayer.h"

QgsLayerCapabilitiesModel::QgsLayerCapabilitiesModel( QgsProject *project, QObject *parent )
: QSortFilterProxyModel( parent )
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsloadstylefromdbdialog.h
Expand Up @@ -19,7 +19,6 @@
#include "ui_qgsloadstylefromdbdialog.h"
#include "qgsguiutils.h"
#include "qgis_app.h"
#include "qgsvectorlayer.h"
#include "qgsvectordataprovider.h"

class APP_EXPORT QgsLoadStyleFromDBDialog : public QDialog, private Ui::QgsLoadStyleFromDBDialogLayout
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsmaptoolselectutils.h
Expand Up @@ -16,11 +16,12 @@ email : jpalmer at linz dot govt dot nz
#ifndef QGSMAPTOOLSELECTUTILS_H
#define QGSMAPTOOLSELECTUTILS_H

#include "qgsvectorlayer.h"
#include <Qt>
#include <QRect>
#include <QPoint>

#include "qgsvectorlayer.h"

class QMouseEvent;
class QgsMapCanvas;
class QgsVectorLayer;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgssourcefieldsproperties.cpp
Expand Up @@ -15,6 +15,7 @@
***************************************************************************/

#include "qgssourcefieldsproperties.h"
#include "qgsvectorlayer.h"

QgsSourceFieldsProperties::QgsSourceFieldsProperties( QgsVectorLayer *layer, QWidget *parent )
: QWidget( parent )
Expand Down
1 change: 0 additions & 1 deletion src/app/qgssourcefieldsproperties.h
Expand Up @@ -31,7 +31,6 @@
#include <QHBoxLayout>
#include <QFormLayout>

#include "qgsvectorlayer.h"
#include "ui_qgssourcefieldsproperties.h"
#include "qgis_app.h"
#include "qgsaddattrdialog.h"
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsstatisticalsummarydockwidget.h
Expand Up @@ -26,6 +26,8 @@
#include "qgsfeedback.h"
#include "qgsvectorlayerutils.h"
#include "qgstaskmanager.h"
#include "qgsvectorlayer.h"

#include "qgis_app.h"

class QMenu;
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsvectorlayerproperties.h
Expand Up @@ -24,7 +24,6 @@
#include "qgsguiutils.h"
#include "qgshelp.h"
#include "qgsmaplayerstylemanager.h"
#include "qgsvectorlayer.h"
#include "qgsvectorlayerjoininfo.h"
#include "layertree/qgslayertree.h"
#include "layertree/qgslayertreemodel.h"
Expand Down
3 changes: 3 additions & 0 deletions src/core/expression/qgsexpressionutils.cpp
Expand Up @@ -15,6 +15,7 @@

#include "qgsexpressionutils.h"
#include "qgsexpressionnode.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand All @@ -35,3 +36,5 @@ QgsExpressionUtils::TVL QgsExpressionUtils::OR[3][3] =
QgsExpressionUtils::TVL QgsExpressionUtils::NOT[3] = { True, False, Unknown };

///@endcond


3 changes: 1 addition & 2 deletions src/core/expression/qgsexpressionutils.h
Expand Up @@ -22,12 +22,11 @@
#include "qgsfeature.h"
#include "qgsexpression.h"
#include "qgscolorramp.h"
#include "qgsvectorlayer.h"
#include "qgsvectorlayerfeatureiterator.h"
#include "qgsrasterlayer.h"
#include "qgsproject.h"
#include "qgsrelationmanager.h"

#include "qgsvectorlayer.h"

#define ENSURE_NO_EVAL_ERROR { if ( parent->hasEvalError() ) return QVariant(); }
#define SET_EVAL_ERROR(x) { parent->setEvalErrorString( x ); return QVariant(); }
Expand Down
1 change: 1 addition & 0 deletions src/core/layout/qgsabstractreportsection.cpp
Expand Up @@ -19,6 +19,7 @@
#include "qgsreport.h"
#include "qgsreportsectionfieldgroup.h"
#include "qgsreportsectionlayout.h"
#include "qgsvectorlayer.h"

///@cond NOT_STABLE

Expand Down
1 change: 1 addition & 0 deletions src/core/layout/qgscompositionconverter.cpp
Expand Up @@ -29,6 +29,7 @@
#include "qgssymbollayer.h"
#include "qgsproject.h"
#include "qgsmaplayerstylemanager.h"
#include "qgsvectorlayer.h"

#include "qgsprintlayout.h"
#include "qgslayoutatlas.h"
Expand Down
1 change: 1 addition & 0 deletions src/core/layout/qgslayout.cpp
Expand Up @@ -28,6 +28,7 @@
#include "qgslayoutitemmap.h"
#include "qgslayoutundostack.h"
#include "qgscompositionconverter.h"
#include "qgsvectorlayer.h"

QgsLayout::QgsLayout( QgsProject *project )
: mProject( project )
Expand Down

0 comments on commit 4b411e0

Please sign in to comment.