[QGIS Commit] r12848 - trunk/qgis/src/core/symbology-ng

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Jan 29 06:16:06 EST 2010


Author: wonder
Date: 2010-01-29 06:16:01 -0500 (Fri, 29 Jan 2010)
New Revision: 12848

Modified:
   trunk/qgis/src/core/symbology-ng/qgssymbolv2.cpp
   trunk/qgis/src/core/symbology-ng/qgssymbolv2.h
Log:
PyQGIS: fix to support older SIP versions (4.7.x)


Modified: trunk/qgis/src/core/symbology-ng/qgssymbolv2.cpp
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgssymbolv2.cpp	2010-01-29 11:11:01 UTC (rev 12847)
+++ trunk/qgis/src/core/symbology-ng/qgssymbolv2.cpp	2010-01-29 11:16:01 UTC (rev 12848)
@@ -265,6 +265,15 @@
   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;
+}
 
 ///////////////////
 

Modified: trunk/qgis/src/core/symbology-ng/qgssymbolv2.h
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgssymbolv2.h	2010-01-29 11:11:01 UTC (rev 12847)
+++ trunk/qgis/src/core/symbology-ng/qgssymbolv2.h	2010-01-29 11:16:01 UTC (rev 12848)
@@ -118,6 +118,9 @@
     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;



More information about the QGIS-commit mailing list