Skip to content
Permalink
Browse files

fix windows build (partly reverts 1a199d0)

  • Loading branch information
jef-n committed Nov 27, 2018
1 parent 06312f0 commit 60ea432cbc6ab0cb9b81a3b3d308d387b7a89e92
@@ -122,7 +122,6 @@ Returns extra information for data-defined size legend rendering. Normally it re

};


typedef QList< QgsLegendSymbolItem > QgsLegendSymbolList;

/************************************************************************
@@ -21,6 +21,7 @@
#include "qgsgloweffect.h"
#include "qgsproperty.h"
#include "qgssymbollayerutils.h"
#include "qgsdatadefinedsizelegend.h"

#define ROOF_EXPRESSION \
"translate(" \
@@ -36,18 +36,24 @@ QgsLegendSymbolItem::QgsLegendSymbolItem( const QgsLegendSymbolItem &other )
*this = other;
}

QgsLegendSymbolItem::~QgsLegendSymbolItem() = default;
QgsLegendSymbolItem::~QgsLegendSymbolItem()
{
delete mSymbol;
delete mDataDefinedSizeLegendSettings;
}

QgsLegendSymbolItem &QgsLegendSymbolItem::operator=( const QgsLegendSymbolItem &other )
{
if ( this == &other )
return *this;

mSymbol.reset( other.mSymbol ? other.mSymbol->clone() : nullptr );
delete mSymbol;
mSymbol = other.mSymbol ? other.mSymbol->clone() : nullptr;
mLabel = other.mLabel;
mKey = other.mKey;
mCheckable = other.mCheckable;
mDataDefinedSizeLegendSettings.reset( other.mDataDefinedSizeLegendSettings ? new QgsDataDefinedSizeLegend( *other.mDataDefinedSizeLegendSettings ) : nullptr );
delete mDataDefinedSizeLegendSettings;
mDataDefinedSizeLegendSettings = other.mDataDefinedSizeLegendSettings ? new QgsDataDefinedSizeLegend( *other.mDataDefinedSizeLegendSettings ) : nullptr;
mOriginalSymbolPointer = other.mOriginalSymbolPointer;
mScaleMinDenom = other.mScaleMinDenom;
mScaleMaxDenom = other.mScaleMaxDenom;
@@ -72,16 +78,18 @@ bool QgsLegendSymbolItem::isScaleOK( double scale ) const

void QgsLegendSymbolItem::setSymbol( QgsSymbol *s )
{
mSymbol.reset( s ? s->clone() : nullptr );
delete mSymbol;
mSymbol = s ? s->clone() : nullptr;
mOriginalSymbolPointer = s;
}

void QgsLegendSymbolItem::setDataDefinedSizeLegendSettings( QgsDataDefinedSizeLegend *settings )
{
mDataDefinedSizeLegendSettings.reset( settings );
delete mDataDefinedSizeLegendSettings;
mDataDefinedSizeLegendSettings = settings;
}

QgsDataDefinedSizeLegend *QgsLegendSymbolItem::dataDefinedSizeLegendSettings() const
{
return mDataDefinedSizeLegendSettings.get();
return mDataDefinedSizeLegendSettings;
}
@@ -53,7 +53,7 @@ class CORE_EXPORT QgsLegendSymbolItem
QgsLegendSymbolItem &operator=( const QgsLegendSymbolItem &other );

//! Returns associated symbol. May be null.
QgsSymbol *symbol() const { return mSymbol.get(); }
QgsSymbol *symbol() const { return mSymbol; }
//! Returns text label
QString label() const { return mLabel; }
//! Returns unique identifier of the rule for identification of the item within renderer
@@ -114,7 +114,7 @@ class CORE_EXPORT QgsLegendSymbolItem

private:
//! Legend symbol -- may be null.
std::unique_ptr< QgsSymbol > mSymbol;
QgsSymbol *mSymbol = nullptr;
//! label of the item (may be empty or non-unique)
QString mLabel;
//! unique identifier of the symbol item (within renderer)
@@ -128,7 +128,7 @@ class CORE_EXPORT QgsLegendSymbolItem
* optional pointer to data-defined legend size settings - if set, the output legend
* node should be QgsDataDefinedSizeLegendNode rather than ordinary QgsSymbolLegendNode
*/
std::unique_ptr< QgsDataDefinedSizeLegend > mDataDefinedSizeLegendSettings;
QgsDataDefinedSizeLegend *mDataDefinedSizeLegendSettings = nullptr;

// additional data that may be used for filtering

0 comments on commit 60ea432

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