Skip to content

Commit

Permalink
PyQGIS: fix to support older SIP versions (4.7.x)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12848 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jan 29, 2010
1 parent f46f158 commit 75323e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/symbology-ng/qgssymbolv2.cpp
Expand Up @@ -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;
}

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

Expand Down
3 changes: 3 additions & 0 deletions src/core/symbology-ng/qgssymbolv2.h
Expand Up @@ -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;
Expand Down

0 comments on commit 75323e8

Please sign in to comment.