Skip to content
Permalink
Browse files

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
  • Loading branch information
wonder
wonder committed Jan 29, 2010
1 parent 6f018ba commit 9c997d23b850a5193954530327d6f36e49bd9dd1
Showing with 12 additions and 0 deletions.
  1. +9 −0 src/core/symbology-ng/qgssymbolv2.cpp
  2. +3 −0 src/core/symbology-ng/qgssymbolv2.h
@@ -265,6 +265,15 @@ double QgsSymbolV2RenderContext::outputPixelSize( double size ) const
return size * QgsSymbolLayerV2Utils::pixelSizeScaleFactor( mRenderContext, mOutputUnit );
}

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

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

@@ -118,6 +118,9 @@ class CORE_EXPORT QgsSymbolV2RenderContext
double outputLineWidth( double width ) const;
double outputPixelSize( double size ) const;

// workaround for sip 4.7. Don't use assignment - will fail with assertion error
QgsSymbolV2RenderContext& operator=( const QgsSymbolV2RenderContext& );

private:
QgsRenderContext& mRenderContext;
QgsSymbolV2::OutputUnit mOutputUnit;

0 comments on commit 9c997d2

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