Skip to content
Permalink
Browse files

Many classes: mark assignment operator as deleted due to existence of…

… copy constructor
  • Loading branch information
rouault committed Jun 1, 2020
1 parent 6fd336c commit cc1488fce934c08bb532cb36cd8d22f5bdea4e19
Showing with 308 additions and 196 deletions.
  1. +1 −0 python/server/auto_generated/qgsaccesscontrol.sip.in
  2. +2 −0 src/3d/symbols/qgspoint3dsymbol.h
  3. +2 −0 src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.h
  4. +2 −0 src/app/georeferencer/qgsgeorefdatapoint.h
  5. +1 −0 src/app/georeferencer/qgsgeoreftransform.h
  6. +2 −0 src/core/expression/qgsexpression_p.h
  7. +2 −0 src/core/layertree/qgslayertree.h
  8. +2 −0 src/core/layertree/qgslayertreegroup.h
  9. +2 −0 src/core/layertree/qgslayertreelayer.h
  10. +3 −0 src/core/layertree/qgslayertreenode.h
  11. +2 −0 src/core/pal/feature.h
  12. +1 −0 src/core/pal/labelposition.h
  13. +2 −0 src/core/pal/pointset.h
  14. +2 −0 src/core/qgscoordinatereferencesystem_p.h
  15. +2 −0 src/core/qgscoordinatetransform_p.h
  16. +2 −0 src/core/qgscoordinatetransformcontext_p.h
  17. +2 −0 src/core/qgsdiagramrenderer.h
  18. +2 −0 src/core/qgseditformconfig_p.h
  19. +3 −0 src/core/qgsfeature_p.h
  20. +3 −0 src/core/qgsfield_p.h
  21. +2 −0 src/core/qgsfields.h
  22. +2 −0 src/core/qgsfields_p.h
  23. +2 −0 src/core/qgsproperty_p.h
  24. +2 −0 src/core/raster/qgscontrastenhancementfunction.h
  25. +14 −1 src/core/textrenderer/qgstextrenderer_p.h
  26. +0 −10 src/plugins/grass/qtermwidget/CharacterColor.h
  27. +2 −0 src/plugins/grass/qtermwidget/ColorScheme.h
  28. +2 −1 src/providers/oracle/ocispatial/qsql_ocispatial.cpp
  29. +2 −0 src/providers/oracle/qgsoracleprovider.h
  30. +2 −0 src/providers/wcs/qgswcscapabilities.h
  31. +13 −0 src/server/qgsaccesscontrol.h
  32. +225 −184 tests/src/core/testqgslabelingengine.cpp
@@ -38,6 +38,7 @@ Constructor

~QgsAccessControl();


void resolveFilterFeatures( const QList<QgsMapLayer *> &layers );
%Docstring
Resolve features' filter of layers
@@ -112,6 +112,8 @@ class _3D_EXPORT QgsPoint3DSymbol : public QgsAbstract3DSymbol
std::unique_ptr<QgsMarkerSymbol> mBillboardSymbol;
#ifdef SIP_RUN
QgsPoint3DSymbol &operator=( const QgsPoint3DSymbol & );
#else
QgsPoint3DSymbol &operator=( const QgsPoint3DSymbol & ) = delete;
#endif
};

@@ -180,6 +180,8 @@ class ANALYSIS_EXPORT QgsGeometryCheckerUtils
QgsFeatureIds::const_iterator mFeatureIt;
const LayerFeatures *mParent = nullptr;
std::unique_ptr<QgsGeometryCheckerUtils::LayerFeature> mCurrentFeature;

iterator &operator= ( const iterator & ) = delete;
};

/**
@@ -68,6 +68,8 @@ class QgsGeorefDataPoint : public QObject
int mId;
bool mEnabled;
QPointF mResidual;

QgsGeorefDataPoint &operator=( const QgsGeorefDataPoint & ) = delete;
};

#endif //QGSGEOREFDATAPOINT_H
@@ -155,6 +155,7 @@ class QgsGeorefTransform : public QgsGeorefTransformInterface
private:
// shallow copy constructor
QgsGeorefTransform( const QgsGeorefTransform &other );
QgsGeorefTransform &operator= ( const QgsGeorefTransform & ) = delete;

//! Factory function which creates an implementation for the given parametrisation.
static QgsGeorefTransformInterface *createImplementation( TransformParametrisation parametrisation );
@@ -80,6 +80,8 @@ class QgsExpressionPrivate

//! Whether prepare() has been called before evaluate()
bool mIsPrepared = false;

QgsExpressionPrivate &operator= ( const QgsExpressionPrivate & ) = delete;
};


@@ -228,6 +228,8 @@ class CORE_EXPORT QgsLayerTree : public QgsLayerTreeGroup
void addMissingLayers();
QgsWeakMapLayerPointerList mCustomLayerOrder;
bool mHasCustomLayerOrder = false;

QgsLayerTree &operator= ( const QgsLayerTree & ) = delete;
};

#endif // QGSLAYERTREE_H
@@ -238,6 +238,8 @@ class CORE_EXPORT QgsLayerTreeGroup : public QgsLayerTreeNode
QgsLayerTreeGroup( const QgsLayerTreeGroup &other );
#endif

QgsLayerTreeGroup &operator= ( const QgsLayerTreeGroup & ) = delete;

};


@@ -266,6 +266,8 @@ class CORE_EXPORT QgsLayerTreeLayer : public QgsLayerTreeNode
QgsLegendPatchShape mPatchShape;
QSizeF mPatchSize;
LegendNodesSplitBehavior mSplitBehavior = UseDefaultLegendSetting;

QgsLayerTreeLayer &operator=( const QgsLayerTreeLayer & ) = delete;
};


@@ -283,6 +283,9 @@ class CORE_EXPORT QgsLayerTreeNode : public QObject
bool mExpanded;
//! custom properties attached to the node
QgsObjectCustomProperties mProperties;

private:
QgsLayerTreeNode &operator=( const QgsLayerTreeNode & ) = delete;
};


@@ -385,6 +385,8 @@ namespace pal

mutable std::size_t mCachedMaxLineCandidates = 0;
mutable std::size_t mCachedMaxPolygonCandidates = 0;

FeaturePart &operator= ( const FeaturePart & ) = delete;
};

} // end namespace pal
@@ -351,6 +351,7 @@ namespace pal
bool isInConflictSinglePart( const LabelPosition *lp ) const;
bool isInConflictMultiPart( const LabelPosition *lp ) const;

LabelPosition &operator=( const LabelPosition & ) = delete;
};

} // end namespace
@@ -235,6 +235,8 @@ namespace pal

mutable const GEOSPreparedGeometry *mPreparedGeom = nullptr;

PointSet &operator= ( const PointSet & ) = delete;

};

} // namespace pal
@@ -243,6 +243,8 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
}
#endif

private:
QgsCoordinateReferenceSystemPrivate &operator= ( const QgsCoordinateReferenceSystemPrivate & ) = delete;

};

@@ -235,6 +235,8 @@ class QgsCoordinateTransformPrivate : public QSharedData
static std::function< void( const QgsCoordinateReferenceSystem &sourceCrs,
const QgsCoordinateReferenceSystem &destinationCrs,
const QgsDatumTransform::TransformDetails &desiredOperation )> sMissingGridUsedByContextHandler;

QgsCoordinateTransformPrivate &operator= ( const QgsCoordinateTransformPrivate & ) = delete;
};

/// @endcond
@@ -78,6 +78,8 @@ class QgsCoordinateTransformContextPrivate : public QSharedData
//! Mutex for making QgsCoordinateTransformContextPrivate thread safe
mutable QReadWriteLock mLock{};

private:
QgsCoordinateTransformContextPrivate &operator= ( const QgsCoordinateTransformContextPrivate & ) = delete;
};


@@ -932,6 +932,8 @@ class CORE_EXPORT QgsLinearlyInterpolatedDiagramRenderer : public QgsDiagramRend

//! Stores more settings about how legend for varying size of symbols should be rendered
QgsDataDefinedSizeLegend *mDataDefinedSizeLegend = nullptr;

QgsLinearlyInterpolatedDiagramRenderer &operator=( const QgsLinearlyInterpolatedDiagramRenderer & ) = delete;
};

#endif // QGSDIAGRAMRENDERER_H
@@ -97,6 +97,8 @@ class QgsEditFormConfigPrivate : public QSharedData

QgsFields mFields;

private:
QgsEditFormConfigPrivate &operator= ( const QgsEditFormConfigPrivate & ) = delete;
};


@@ -76,6 +76,9 @@ class QgsFeaturePrivate : public QSharedData
//! Optional field map for name-based attribute lookups
QgsFields fields;

private:
QgsFeaturePrivate &operator=( const QgsFeaturePrivate & ) = delete;

};

/// @endcond
@@ -119,6 +119,9 @@ class QgsFieldPrivate : public QSharedData
QgsFieldConstraints constraints;

QgsEditorWidgetSetup editorWidgetSetup;

private:
QgsFieldPrivate &operator=( const QgsFieldPrivate & ) = delete;
};

/// @endcond
@@ -432,6 +432,8 @@ class CORE_EXPORT QgsFields
inline const_iterator operator+( difference_type j ) const { return const_iterator( d + j ); }
inline const_iterator operator-( difference_type j ) const { return const_iterator( d - j ); }
inline int operator-( const_iterator j ) const { return int( d - j.d ); } // clazy:exclude=function-args-by-ref
private:
const_iterator &operator= ( const const_iterator & ) = delete;
};
friend class const_iterator;
///@endcond
@@ -61,6 +61,8 @@ class QgsFieldsPrivate : public QSharedData
//! map for quick resolution of name to index
QHash<QString, int> nameToIndex;

private:
QgsFieldsPrivate &operator= ( const QgsFieldsPrivate & ) = delete;
};

/// @endcond
@@ -83,6 +83,8 @@ class QgsPropertyPrivate : public QSharedData
//! Cached set of referenced columns
mutable QSet< QString > expressionReferencedCols;

private:
QgsPropertyPrivate &operator=( const QgsPropertyPrivate & ) = delete;
};

///@endcond PRIVATE
@@ -93,6 +93,8 @@ class CORE_EXPORT QgsContrastEnhancementFunction
double mMaximumValuePossible = std::numeric_limits< double >::max() SIP_SKIP;
double mMinimumValuePossible = std::numeric_limits< double >::lowest() SIP_SKIP;

private:
QgsContrastEnhancementFunction &operator=( const QgsContrastEnhancementFunction & ) = delete;
};

#endif
@@ -77,6 +77,9 @@ class QgsTextBufferSettingsPrivate : public QSharedData
Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
std::unique_ptr< QgsPaintEffect > paintEffect;

private:
QgsTextBufferSettingsPrivate &operator=( const QgsTextBufferSettingsPrivate & ) = delete;
};


@@ -148,6 +151,9 @@ class QgsTextBackgroundSettingsPrivate : public QSharedData
Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
std::unique_ptr< QgsPaintEffect > paintEffect;
std::unique_ptr< QgsMarkerSymbol > markerSymbol;

private:
QgsTextBackgroundSettingsPrivate &operator=( const QgsTextBackgroundSettingsPrivate & ) = delete;
};


@@ -197,6 +203,9 @@ class QgsTextShadowSettingsPrivate : public QSharedData
QColor color;
double opacity = 0.7;
QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;

private:
QgsTextShadowSettingsPrivate &operator=( const QgsTextShadowSettingsPrivate & ) = delete;
};


@@ -232,6 +241,9 @@ class QgsTextMaskSettingsPrivate : public QSharedData
double opacity = 1.0;
std::unique_ptr< QgsPaintEffect > paintEffect;
QgsSymbolLayerReferenceList maskedSymbolLayers;

private:
QgsTextMaskSettingsPrivate &operator=( const QgsTextMaskSettingsPrivate & ) = delete;
};


@@ -279,7 +291,8 @@ class QgsTextSettingsPrivate : public QSharedData
//! Property collection for data defined settings
QgsPropertyCollection mDataDefinedProperties;


private:
QgsTextSettingsPrivate &operator=( const QgsTextSettingsPrivate & ) = delete;
};


@@ -78,16 +78,6 @@ class ColorEntry
*/
ColorEntry() : transparent(false), fontWeight(UseCurrentFormat) {}

/**
* Sets the color, transparency and boldness of this color to those of @p rhs.
*/
void operator=(const ColorEntry& rhs)
{
color = rhs.color;
transparent = rhs.transparent;
fontWeight = rhs.fontWeight;
}

/** The color value of this entry for display. */
QColor color;

@@ -200,6 +200,8 @@ class ColorScheme
static const char* const translatedColorNames[TABLE_COLORS];

static const ColorEntry defaultTable[]; // table of default color entries

ColorScheme& operator=(const ColorScheme&) = delete;
};

/**
@@ -152,7 +152,7 @@ static QString qOraWarn( OCIError *err, int *errorCode = nullptr );
#ifndef Q_CC_SUN
static // for some reason, Sun CC can't use qOraWarning when it's declared static
#endif
void qOraWarningAt( const char *msg, OCIError *err, const char *file, const char *function, int line );
void qOraWarningAt( const char *msg, OCIError *err, const char *function, const char *file, int line );
static QSqlError qMakeError( const QString &errString, QSqlError::ErrorType type, OCIError *err );

#ifndef _MSC_VER
@@ -309,6 +309,7 @@ class QOCISpatialRowId: public QSharedData

private:
QOCISpatialRowId( const QOCISpatialRowId &other ): QSharedData( other ) { Q_ASSERT( false ); }
QOCISpatialRowId &operator= ( const QOCISpatialRowId & ) = delete;
};

QOCISpatialRowId::QOCISpatialRowId( OCIEnv *env )
@@ -313,6 +313,8 @@ class QgsOracleProvider final: public QgsVectorDataProvider

private:
QString mWhat;

OracleException &operator= ( const OracleException & ) = delete;
};

// A function that determines if the given schema.table.column
@@ -385,6 +385,8 @@ class QgsWcsCapabilities : public QObject

//! Cache load control
QNetworkRequest::CacheLoadControl mCacheLoadControl = QNetworkRequest::PreferNetwork;

QgsWcsCapabilities &operator=( const QgsWcsCapabilities & ) = delete;
};


@@ -61,6 +61,19 @@ class SERVER_EXPORT QgsAccessControl : public QgsFeatureFilterProvider
delete mPluginsAccessControls;
}

//! Assignment operator
QgsAccessControl &operator= ( const QgsAccessControl &other )
{
if ( this != &other )
{
delete mPluginsAccessControls;
mPluginsAccessControls = new QgsAccessControlFilterMap( *other.mPluginsAccessControls );
mFilterFeaturesExpressions = other.mFilterFeaturesExpressions;
mResolved = other.mResolved;
}
return *this;
}

/**
* Resolve features' filter of layers
* \param layers to filter

0 comments on commit cc1488f

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