mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix leak
This commit is contained in:
parent
6de34d472e
commit
4d67f803b4
@ -261,7 +261,8 @@ Recalculate classes for a layer
|
||||
:param nclasses: the number of classes
|
||||
%End
|
||||
|
||||
const QgsRendererRangeLabelFormat &labelFormat() const;
|
||||
|
||||
QgsRendererRangeLabelFormat labelFormat() const /Deprecated/;
|
||||
%Docstring
|
||||
Returns the label format used to generate default classification labels
|
||||
|
||||
|
@ -433,14 +433,12 @@ void QgsGraduatedSymbolRenderer::updateClasses( const QgsVectorLayer *vl, int nc
|
||||
updateColorRamp( nullptr );
|
||||
}
|
||||
|
||||
const QgsRendererRangeLabelFormat &QgsGraduatedSymbolRenderer::labelFormat() const
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
QgsRendererRangeLabelFormat QgsGraduatedSymbolRenderer::labelFormat() const
|
||||
{
|
||||
// this is leaking but will be removed in QGIS 4
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
QgsRendererRangeLabelFormat *format = new QgsRendererRangeLabelFormat( mClassificationMethod->labelFormat(), mClassificationMethod->labelPrecision(), mClassificationMethod->labelTrimTrailingZeroes() );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
return *format;
|
||||
return QgsRendererRangeLabelFormat( mClassificationMethod->labelFormat(), mClassificationMethod->labelPrecision(), mClassificationMethod->labelTrimTrailingZeroes() );
|
||||
}
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
|
||||
QgsFeatureRenderer *QgsGraduatedSymbolRenderer::create( QDomElement &element, const QgsReadWriteContext &context )
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ class CORE_EXPORT QgsGraduatedSymbolRenderer : public QgsFeatureRenderer
|
||||
* \since QGIS 2.6
|
||||
* \deprecated since QGIS 3.10 use classificationMethod() and QgsClassificationMethod::setLabelFormat instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED const QgsRendererRangeLabelFormat &labelFormat() const;
|
||||
Q_DECL_DEPRECATED QgsRendererRangeLabelFormat labelFormat() const SIP_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Set the label format used to generate default classification labels
|
||||
|
Loading…
x
Reference in New Issue
Block a user