Skip to content

Commit 9c997d2

Browse files
author
wonder
committed
PyQGIS: fix to support older SIP versions (4.7.x)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12848 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6f018ba commit 9c997d2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/core/symbology-ng/qgssymbolv2.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,15 @@ double QgsSymbolV2RenderContext::outputPixelSize( double size ) const
265265
return size * QgsSymbolLayerV2Utils::pixelSizeScaleFactor( mRenderContext, mOutputUnit );
266266
}
267267

268+
QgsSymbolV2RenderContext& QgsSymbolV2RenderContext::operator=( const QgsSymbolV2RenderContext& )
269+
{
270+
// This is just a dummy implementation of assignment.
271+
// sip 4.7 generates a piece of code that needs this function to exist.
272+
// It's not generated automatically by the compiler because of
273+
// mRenderContext member which is a reference (and thus can't be changed).
274+
Q_ASSERT(false);
275+
return *this;
276+
}
268277

269278
///////////////////
270279

src/core/symbology-ng/qgssymbolv2.h

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ class CORE_EXPORT QgsSymbolV2RenderContext
118118
double outputLineWidth( double width ) const;
119119
double outputPixelSize( double size ) const;
120120

121+
// workaround for sip 4.7. Don't use assignment - will fail with assertion error
122+
QgsSymbolV2RenderContext& operator=( const QgsSymbolV2RenderContext& );
123+
121124
private:
122125
QgsRenderContext& mRenderContext;
123126
QgsSymbolV2::OutputUnit mOutputUnit;

0 commit comments

Comments
 (0)