Skip to content
Permalink
Browse files

Optimise passing of variables by ref/value

  • Loading branch information
nyalldawson committed Oct 24, 2016
1 parent 8a742e9 commit 44289084e966b42921ce0b789d2f22d0d8310596
Showing with 477 additions and 469 deletions.
  1. +1 −1 python/analysis/vector/qgszonalstatistics.sip
  2. +1 −1 python/core/auth/qgsauthmethod.sip
  3. +1 −1 python/core/composer/qgscomposermapgrid.sip
  4. +6 −6 python/core/composer/qgscomposernodesitem.sip
  5. +2 −2 python/core/composer/qgscomposerpolygon.sip
  6. +2 −2 python/core/composer/qgscomposerpolyline.sip
  7. +1 −1 python/core/dxf/qgsdxfexport.sip
  8. +1 −1 python/core/layertree/qgslayertreemodel.sip
  9. +2 −2 python/core/qgsattributetableconfig.sip
  10. +5 −5 python/core/qgsdataitem.sip
  11. +2 −2 python/core/qgsdatetimestatisticalsummary.sip
  12. +1 −1 python/core/qgsinterval.sip
  13. +1 −1 python/core/qgsmaplayerdependency.sip
  14. +1 −1 python/core/qgsmaplayerproxymodel.sip
  15. +1 −1 python/core/qgsmaprenderercustompainterjob.sip
  16. +1 −1 python/core/qgsmapsettings.sip
  17. +1 −1 python/core/qgsproject.sip
  18. +1 −1 python/core/qgsrendercontext.sip
  19. +1 −1 python/core/qgssnappingconfig.sip
  20. +5 −5 python/core/qgssqlstatement.sip
  21. +2 −2 python/core/qgsstatisticalsummary.sip
  22. +2 −2 python/core/qgsstringstatisticalsummary.sip
  23. +2 −2 python/core/qgsvectorfilewriter.sip
  24. +2 −2 python/core/qgsvectorlayer.sip
  25. +1 −1 python/core/qgsvectorlayereditbuffer.sip
  26. +1 −1 python/core/qgsvectorlayereditpassthrough.sip
  27. +1 −1 python/core/qgsvectorlayerundocommand.sip
  28. +2 −2 python/core/qgsvectorsimplifymethod.sip
  29. +1 −1 python/core/raster/qgsrasterdataprovider.sip
  30. +1 −1 python/core/raster/qgsrasterfilewriter.sip
  31. +1 −1 python/core/symbology-ng/qgscategorizedsymbolrenderer.sip
  32. +1 −1 python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip
  33. +1 −1 python/core/symbology-ng/qgspointdistancerenderer.sip
  34. +1 −1 python/core/symbology-ng/qgsrulebasedrenderer.sip
  35. +1 −1 python/core/symbology-ng/qgssymbollayerutils.sip
  36. +1 −1 python/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip
  37. +2 −2 python/gui/qgsdatadefinedbutton.sip
  38. +1 −1 python/gui/qgsdialog.sip
  39. +1 −1 python/gui/qgsexternalresourcewidget.sip
  40. +1 −1 python/gui/qgsfieldcombobox.sip
  41. +1 −1 python/gui/qgsfieldexpressionwidget.sip
  42. +1 −1 python/gui/qgsfieldproxymodel.sip
  43. +5 −5 python/gui/qgsmaplayeractionregistry.sip
  44. +1 −1 python/gui/qgsmaplayerconfigwidgetfactory.sip
  45. +2 −2 python/gui/qgsmaptoolcapture.sip
  46. +3 −3 python/gui/qgsmaptoolidentify.sip
  47. +2 −2 python/gui/qgspanelwidget.sip
  48. +1 −1 python/gui/symbology-ng/qgsrendererpropertiesdialog.sip
  49. +1 −1 python/gui/symbology-ng/qgssvgselectorwidget.sip
  50. +1 −1 python/server/qgsrequesthandler.sip
  51. +1 −1 python/server/qgswmserver.sip
  52. +1 −1 python/server/qgswmsprojectparser.sip
  53. +1 −1 src/analysis/vector/qgszonalstatistics.cpp
  54. +1 −1 src/analysis/vector/qgszonalstatistics.h
  55. +1 −1 src/app/main.cpp
  56. +1 −1 src/app/nodetool/qgsselectedfeature.cpp
  57. +1 −1 src/app/nodetool/qgsselectedfeature.h
  58. +3 −3 src/app/qgisapp.cpp
  59. +1 −1 src/app/qgisapp.h
  60. +2 −2 src/app/qgsfieldsproperties.cpp
  61. +2 −2 src/app/qgsfieldsproperties.h
  62. +1 −1 src/app/qgslabelinggui.cpp
  63. +1 −1 src/app/qgslabelinggui.h
  64. +2 −2 src/app/qgslayerstylingwidget.cpp
  65. +2 −2 src/app/qgslayerstylingwidget.h
  66. +1 −1 src/app/qgsmeasuretool.cpp
  67. +1 −1 src/app/qgsmeasuretool.h
  68. +1 −1 src/core/auth/qgsauthmethod.h
  69. +2 −2 src/core/composer/qgscomposermapgrid.cpp
  70. +2 −2 src/core/composer/qgscomposermapgrid.h
  71. +7 −7 src/core/composer/qgscomposernodesitem.cpp
  72. +6 −6 src/core/composer/qgscomposernodesitem.h
  73. +2 −2 src/core/composer/qgscomposerpolygon.cpp
  74. +2 −2 src/core/composer/qgscomposerpolygon.h
  75. +2 −2 src/core/composer/qgscomposerpolyline.cpp
  76. +2 −2 src/core/composer/qgscomposerpolyline.h
  77. +2 −2 src/core/dxf/qgsdxfexport.cpp
  78. +2 −2 src/core/dxf/qgsdxfexport.h
  79. +1 −1 src/core/geometry/qgsgeometryutils.cpp
  80. +1 −1 src/core/geometry/qgsgeometryutils.h
  81. +1 −1 src/core/geometry/qgsgeos.h
  82. +1 −1 src/core/layertree/qgslayertreemodel.cpp
  83. +1 −1 src/core/layertree/qgslayertreemodel.h
  84. +1 −1 src/core/pal/layer.h
  85. +2 −2 src/core/qgsattributetableconfig.cpp
  86. +2 −2 src/core/qgsattributetableconfig.h
  87. +3 −3 src/core/qgsdataitem.cpp
  88. +5 −5 src/core/qgsdataitem.h
  89. +1 −1 src/core/qgsdatetimestatisticalsummary.cpp
  90. +2 −2 src/core/qgsdatetimestatisticalsummary.h
  91. +2 −2 src/core/qgsfeaturerequest.cpp
  92. +2 −2 src/core/qgsfeaturerequest.h
  93. +9 −9 src/core/qgsfields.h
  94. +4 −4 src/core/qgsinterval.cpp
  95. +3 −3 src/core/qgsinterval.h
  96. +1 −1 src/core/qgslabelingengine.h
  97. +1 −1 src/core/qgsmaplayerdependency.h
  98. +1 −1 src/core/qgsmaplayerproxymodel.cpp
  99. +1 −1 src/core/qgsmaplayerproxymodel.h
  100. +1 −1 src/core/qgsmaprenderercustompainterjob.cpp
  101. +1 −1 src/core/qgsmaprenderercustompainterjob.h
  102. +1 −1 src/core/qgsmapsettings.cpp
  103. +1 −1 src/core/qgsmapsettings.h
  104. +1 −1 src/core/qgsproject.cpp
  105. +1 −1 src/core/qgsproject.h
  106. +1 −1 src/core/qgsrendercontext.cpp
  107. +1 −1 src/core/qgsrendercontext.h
  108. +1 −1 src/core/qgssnappingconfig.cpp
  109. +1 −1 src/core/qgssnappingconfig.h
  110. +1 −1 src/core/qgssnappingutils.cpp
  111. +1 −1 src/core/qgssnappingutils.h
  112. +1 −1 src/core/qgssqlexpressioncompiler.cpp
  113. +1 −1 src/core/qgssqlexpressioncompiler.h
  114. +1 −1 src/core/qgssqlstatement.cpp
  115. +6 −6 src/core/qgssqlstatement.h
  116. +2 −2 src/core/qgssqlstatementparser.yy
  117. +1 −1 src/core/qgsstatisticalsummary.cpp
  118. +2 −2 src/core/qgsstatisticalsummary.h
  119. +1 −1 src/core/qgsstringstatisticalsummary.cpp
  120. +2 −2 src/core/qgsstringstatisticalsummary.h
  121. +2 −2 src/core/qgsvectorfilewriter.cpp
  122. +2 −2 src/core/qgsvectorfilewriter.h
  123. +2 −2 src/core/qgsvectorlayer.cpp
  124. +2 −2 src/core/qgsvectorlayer.h
  125. +1 −1 src/core/qgsvectorlayereditbuffer.cpp
  126. +1 −1 src/core/qgsvectorlayereditbuffer.h
  127. +1 −1 src/core/qgsvectorlayereditpassthrough.cpp
  128. +1 −1 src/core/qgsvectorlayereditpassthrough.h
  129. +1 −0 src/core/qgsvectorlayerjoinbuffer.cpp
  130. +1 −1 src/core/qgsvectorlayerundocommand.cpp
  131. +1 −1 src/core/qgsvectorlayerundocommand.h
  132. +2 −2 src/core/qgsvectorsimplifymethod.h
  133. +1 −1 src/core/raster/qgsrasterdataprovider.h
  134. +1 −1 src/core/raster/qgsrasterfilewriter.cpp
  135. +1 −1 src/core/raster/qgsrasterfilewriter.h
  136. +5 −5 src/core/symbology-ng/qgsarrowsymbollayer.cpp
  137. +4 −3 src/core/symbology-ng/qgscategorizedsymbolrenderer.cpp
  138. +1 −1 src/core/symbology-ng/qgscategorizedsymbolrenderer.h
  139. +5 −4 src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp
  140. +1 −1 src/core/symbology-ng/qgsgraduatedsymbolrenderer.h
  141. +1 −1 src/core/symbology-ng/qgspointdistancerenderer.cpp
  142. +1 −1 src/core/symbology-ng/qgspointdistancerenderer.h
  143. +1 −1 src/core/symbology-ng/qgsrenderer.cpp
  144. +2 −2 src/core/symbology-ng/qgsrenderer.h
  145. +1 −1 src/core/symbology-ng/qgsrulebasedrenderer.cpp
  146. +1 −1 src/core/symbology-ng/qgsrulebasedrenderer.h
  147. +5 −3 src/core/symbology-ng/qgssinglesymbolrenderer.cpp
  148. +1 −1 src/core/symbology-ng/qgssinglesymbolrenderer.h
  149. +1 −1 src/core/symbology-ng/qgssymbollayerutils.cpp
  150. +1 −1 src/core/symbology-ng/qgssymbollayerutils.h
  151. +1 −1 src/gui/attributetable/qgsattributetablefiltermodel.cpp
  152. +1 −1 src/gui/attributetable/qgsattributetablefiltermodel.h
  153. +1 −1 src/gui/attributetable/qgsfeaturelistview.cpp
  154. +1 −1 src/gui/attributetable/qgsfeaturelistview.h
  155. +1 −1 src/gui/attributetable/qgsfeatureselectionmodel.cpp
  156. +1 −1 src/gui/attributetable/qgsfeatureselectionmodel.h
  157. +1 −1 src/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.cpp
  158. +1 −1 src/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.h
  159. +1 −1 src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp
  160. +1 −1 src/gui/editorwidgets/qgsvaluemapconfigdlg.h
  161. +2 −2 src/gui/qgsattributeform.h
  162. +2 −2 src/gui/qgscomposerview.cpp
  163. +2 −2 src/gui/qgscomposerview.h
  164. +2 −2 src/gui/qgsdatadefinedbutton.cpp
  165. +2 −2 src/gui/qgsdatadefinedbutton.h
  166. +1 −1 src/gui/qgsdialog.cpp
  167. +1 −1 src/gui/qgsdialog.h
  168. +1 −1 src/gui/qgsexternalresourcewidget.cpp
  169. +1 −1 src/gui/qgsexternalresourcewidget.h
  170. +1 −1 src/gui/qgsfieldcombobox.cpp
  171. +1 −1 src/gui/qgsfieldcombobox.h
  172. +1 −1 src/gui/qgsfieldexpressionwidget.cpp
  173. +1 −1 src/gui/qgsfieldexpressionwidget.h
  174. +1 −1 src/gui/qgsfieldproxymodel.cpp
  175. +1 −1 src/gui/qgsfieldproxymodel.h
  176. +4 −4 src/gui/qgsmaplayeractionregistry.cpp
  177. +5 −5 src/gui/qgsmaplayeractionregistry.h
  178. +1 −1 src/gui/qgsmaplayercombobox.h
  179. +1 −1 src/gui/qgsmaplayerconfigwidgetfactory.cpp
  180. +1 −1 src/gui/qgsmaplayerconfigwidgetfactory.h
  181. +5 −5 src/gui/qgsmaplayerstylemanagerwidget.cpp
  182. +5 −5 src/gui/qgsmaplayerstylemanagerwidget.h
  183. +2 −2 src/gui/qgsmaptoolcapture.cpp
  184. +2 −2 src/gui/qgsmaptoolcapture.h
  185. +3 −3 src/gui/qgsmaptoolidentify.cpp
  186. +3 −3 src/gui/qgsmaptoolidentify.h
  187. +1 −1 src/gui/qgspanelwidget.cpp
  188. +2 −2 src/gui/qgspanelwidget.h
  189. +1 −1 src/gui/qgssourceselectdialog.cpp
  190. +1 −1 src/gui/qgssourceselectdialog.h
  191. +1 −1 src/gui/qgssqlcomposerdialog.cpp
  192. +1 −1 src/gui/qgssqlcomposerdialog.h
  193. +1 −1 src/gui/symbology-ng/qgsrendererpropertiesdialog.cpp
  194. +1 −1 src/gui/symbology-ng/qgsrendererpropertiesdialog.h
  195. +1 −1 src/gui/symbology-ng/qgssvgselectorwidget.h
  196. +4 −4 src/plugins/georeferencer/qgsleastsquares.cpp
  197. +4 −4 src/plugins/georeferencer/qgsleastsquares.h
  198. +1 −1 src/plugins/qgisplugin.h
  199. +1 −1 src/plugins/spatialquery/qgsspatialqueryplugin.cpp
  200. +1 −1 src/plugins/spatialquery/qgsspatialqueryplugin.h
  201. +2 −2 src/plugins/topology/topolError.cpp
  202. +2 −2 src/plugins/topology/topolError.h
  203. +1 −1 src/providers/arcgisrest/qgsafsprovider.cpp
  204. +1 −1 src/providers/arcgisrest/qgsafsprovider.h
  205. +1 −1 src/providers/arcgisrest/qgsamsprovider.cpp
  206. +1 −1 src/providers/arcgisrest/qgsamsprovider.h
  207. +1 −1 src/providers/db2/qgsdb2geometrycolumns.cpp
  208. +2 −2 src/providers/db2/qgsdb2geometrycolumns.h
  209. +2 −2 src/providers/db2/qgsdb2provider.cpp
  210. +2 −2 src/providers/db2/qgsdb2provider.h
  211. +6 −6 src/providers/db2/qgsdb2sourceselect.cpp
  212. +6 −6 src/providers/db2/qgsdb2sourceselect.h
  213. +1 −1 src/providers/gdal/qgsgdaldataitems.cpp
  214. +1 −1 src/providers/gdal/qgsgdaldataitems.h
  215. +1 −1 src/providers/gdal/qgsgdalprovider.cpp
  216. +1 −1 src/providers/gdal/qgsgdalprovider.h
  217. +14 −14 src/providers/grass/qgsgrass.cpp
  218. +16 −16 src/providers/grass/qgsgrass.h
  219. +2 −2 src/providers/grass/qgsgrassimport.cpp
  220. +2 −2 src/providers/grass/qgsgrassimport.h
  221. +3 −3 src/providers/grass/qgsgrassprovider.cpp
  222. +3 −3 src/providers/grass/qgsgrassprovider.h
  223. +4 −4 src/providers/grass/qgsgrassprovidermodule.cpp
  224. +5 −5 src/providers/grass/qgsgrassprovidermodule.h
  225. +2 −2 src/providers/grass/qgsgrassrasterprovider.cpp
  226. +5 −2 src/providers/grass/qgsgrassrasterprovider.h
  227. +2 −2 src/providers/grass/qgsgrassvectormaplayer.cpp
  228. +2 −2 src/providers/grass/qgsgrassvectormaplayer.h
  229. +3 −3 src/providers/mssql/qgsmssqlsourceselect.cpp
  230. +3 −3 src/providers/mssql/qgsmssqlsourceselect.h
  231. +2 −2 src/providers/ogr/qgsogrconnpool.h
  232. +1 −1 src/providers/ogr/qgsogrdataitems.cpp
  233. +1 −1 src/providers/ogr/qgsogrdataitems.h
  234. +1 −1 src/providers/ogr/qgsogrprovider.h
  235. +2 −2 src/providers/postgres/qgspostgresconn.cpp
  236. +2 −2 src/providers/postgres/qgspostgresconn.h
  237. +2 −2 src/providers/postgres/qgspostgresconnpool.h
  238. +2 −2 src/providers/spatialite/qgsspatialiteconnpool.h
  239. +1 −1 src/providers/virtual/qgsvirtuallayerqueryparser.h
  240. +1 −1 src/providers/virtual/qgsvirtuallayersourceselect.cpp
  241. +1 −1 src/providers/virtual/qgsvirtuallayersourceselect.h
  242. +1 −1 src/providers/wfs/qgswfsfeatureiterator.cpp
  243. +1 −1 src/providers/wfs/qgswfsfeatureiterator.h
  244. +2 −2 src/providers/wfs/qgswfsshareddata.cpp
  245. +2 −2 src/providers/wfs/qgswfsshareddata.h
  246. +1 −1 src/providers/wms/qgswmscapabilities.cpp
  247. +1 −1 src/providers/wms/qgswmscapabilities.h
  248. +1 −1 src/providers/wms/qgswmsprovider.cpp
  249. +2 −2 src/providers/wms/qgswmsprovider.h
  250. +2 −2 src/server/qgshttprequesthandler.cpp
  251. +2 −2 src/server/qgshttprequesthandler.h
  252. +2 −2 src/server/qgsrequesthandler.h
  253. +1 −1 src/server/qgssoaprequesthandler.h
  254. +1 −1 src/server/qgswmsprojectparser.cpp
  255. +1 −1 src/server/qgswmsprojectparser.h
  256. +1 −1 src/server/qgswmsserver.cpp
  257. +1 −1 src/server/qgswmsserver.h
@@ -31,7 +31,7 @@ class QgsZonalStatistics
typedef QFlags<QgsZonalStatistics::Statistic> Statistics;

QgsZonalStatistics( QgsVectorLayer* polygonLayer, const QString& rasterFile, const QString& attributePrefix = "", int rasterBand = 1,
const QgsZonalStatistics::Statistics& stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean) );
QgsZonalStatistics::Statistics stats = QgsZonalStatistics::Statistics( QgsZonalStatistics::Count | QgsZonalStatistics::Sum | QgsZonalStatistics::Mean) );

/** Starts the calculation
@return 0 in case of success*/
@@ -105,7 +105,7 @@ class QgsAuthMethod : QObject
void setVersion( int version );

/** Set the support expansions (points in providers where the authentication is injected) of the auth method */
void setExpansions( const QgsAuthMethod::Expansions& expansions );
void setExpansions( QgsAuthMethod::Expansions expansions );
/** Set list of data providers this auth method supports */
void setDataProviders( const QStringList& dataproviders );
};
@@ -684,7 +684,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
* @see frameSideFlags
* @see testFrameSideFlag
*/
void setFrameSideFlags( const FrameSideFlags& flags );
void setFrameSideFlags( FrameSideFlags flags );

/** Sets whether the grid frame is drawn for a certain side of the map item.
* @param flag flag for grid frame side
@@ -5,8 +5,8 @@ class QgsComposerNodesItem: QgsComposerItem
%End
public:

QgsComposerNodesItem( QString mTagName, QgsComposition* c );
QgsComposerNodesItem( QString mTagName, QPolygonF polygon, QgsComposition* c );
QgsComposerNodesItem( const QString& mTagName, QgsComposition* c );
QgsComposerNodesItem( const QString& mTagName, const QPolygonF& polygon, QgsComposition* c );
~QgsComposerNodesItem();

/** Add a node in current shape.
@@ -16,7 +16,7 @@ class QgsComposerNodesItem: QgsComposerItem
* true. Typically, if this flag is true, the new node has to be nearest
* than radius to the shape to be added.
*/
bool addNode( const QPointF &pt, const bool checkArea = true, const double radius = 10 );
bool addNode( QPointF pt, const bool checkArea = true, const double radius = 10 );

/** Set a tag to indicate if we want to draw or not the shape's nodes.
* @param display
@@ -27,7 +27,7 @@ class QgsComposerNodesItem: QgsComposerItem
* @param index the index of the node to move
* @param node is the new position in scene coordinate
*/
bool moveNode( const int index, const QPointF &node );
bool moveNode( const int index, QPointF node );

/** \brief Reimplementation of QCanvasItem::paint - draw on canvas */
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
@@ -85,7 +85,7 @@ class QgsComposerNodesItem: QgsComposerItem
protected:

/** Method called in addNode. */
virtual bool _addNode( const int nodeIndex, const QPointF &newPoint, const double radius ) = 0;
virtual bool _addNode( const int nodeIndex, QPointF newPoint, const double radius ) = 0;

/** Method called in removeNode. */
virtual bool _removeNode( const int nodeIndex ) = 0;
@@ -104,7 +104,7 @@ class QgsComposerNodesItem: QgsComposerItem
void rescaleToFitBoundingBox();

/** Compute an euclidian distance between 2 nodes. */
double computeDistance(const QPointF &pt1, const QPointF &pt2) const;
double computeDistance( QPointF pt1, QPointF pt2) const;

/** Update the current scene rectangle for this item. */
void updateSceneRect();
@@ -6,7 +6,7 @@ class QgsComposerPolygon: QgsComposerNodesItem
public:

QgsComposerPolygon( QgsComposition* c );
QgsComposerPolygon( QPolygonF polygon, QgsComposition* c );
QgsComposerPolygon( const QPolygonF& polygon, QgsComposition* c );
~QgsComposerPolygon();

/** Overridden to return shape name */
@@ -23,7 +23,7 @@ class QgsComposerPolygon: QgsComposerNodesItem

protected:

bool _addNode( const int indexPoint, const QPointF &newPoint, const double radius );
bool _addNode( const int indexPoint, QPointF newPoint, const double radius );

bool _removeNode( const int indexPoint );

@@ -6,7 +6,7 @@ class QgsComposerPolyline: QgsComposerNodesItem
public:

QgsComposerPolyline( QgsComposition* c );
QgsComposerPolyline( QPolygonF polyline, QgsComposition* c );
QgsComposerPolyline( const QPolygonF& polyline, QgsComposition* c );
~QgsComposerPolyline();

/** Overridden to return shape name */
@@ -23,7 +23,7 @@ class QgsComposerPolyline: QgsComposerNodesItem

protected:

bool _addNode( const int indexPoint, const QPointF &newPoint, const double radius );
bool _addNode( const int indexPoint, QPointF newPoint, const double radius );

bool _removeNode( const int indexPoint );

@@ -301,6 +301,6 @@ class QgsDxfExport
* @param fid id of feature
* @param layer dxf layer of feature
*/
void registerDxfLayer( QString layerId, QgsFeatureId fid, QString layer );
void registerDxfLayer( const QString& layerId, QgsFeatureId fid, const QString& layer );

};
@@ -65,7 +65,7 @@ class QgsLayerTreeModel : QAbstractItemModel
typedef QFlags<QgsLayerTreeModel::Flag> Flags;

//! Set OR-ed combination of model flags
void setFlags( const Flags& f );
void setFlags( Flags f );
//! Enable or disable a model flag
void setFlag( Flag f, bool on = true );
//! Return OR-ed combination of model flags
@@ -107,7 +107,7 @@ class QgsAttributeTableConfig
/**
* Set the style of the action widget
*/
void setActionWidgetStyle( const ActionWidgetStyle& actionWidgetStyle );
void setActionWidgetStyle( ActionWidgetStyle actionWidgetStyle );

/**
* Serialize to XML on layer save
@@ -165,5 +165,5 @@ class QgsAttributeTableConfig
* Set the sort order
* @note Added in 2.16
*/
void setSortOrder( const Qt::SortOrder& sortOrder );
void setSortOrder( Qt::SortOrder sortOrder );
};
@@ -160,12 +160,12 @@ class QgsDataItem : QObject
typedef QFlags<QgsDataItem::Capability> Capabilities;

// This will _write_ selected crs in data source
virtual bool setCrs( QgsCoordinateReferenceSystem crs );
virtual bool setCrs( const QgsCoordinateReferenceSystem& crs );

// ### QGIS 3 - rename to capabilities()
virtual Capabilities capabilities2() const;

virtual void setCapabilities( const Capabilities& capabilities );
virtual void setCapabilities( Capabilities capabilities );

// static methods

@@ -208,7 +208,7 @@ class QgsDataItem : QObject

protected:
virtual void populate( const QVector<QgsDataItem*>& children );
virtual void refresh( QVector<QgsDataItem*> children );
virtual void refresh( const QVector<QgsDataItem*>& children );
/** The item is scheduled to be deleted. E.g. if deleteLater() is called when
* item is in Populating state (createChildren() running in another thread),
* the deferredDelete() returns true and item will be deleted once Populating finished.
@@ -378,7 +378,7 @@ class QgsDirectoryItem : QgsDataCollectionItem
// static QVector<QLibrary*> mLibraries;

/** Check if the given path is hidden from the browser model */
static bool hiddenPath( QString path );
static bool hiddenPath( const QString& path );

public slots:
virtual void childrenCreated();
@@ -482,7 +482,7 @@ class QgsZipItem : QgsDataCollectionItem

static QString vsiPrefix( const QString& uri );

static QgsDataItem* itemFromPath( QgsDataItem* parent, QString path, QString name ) /Factory/;
static QgsDataItem* itemFromPath( QgsDataItem* parent, const QString& path, const QString& name ) /Factory/;
//! @note available in python as itemFromFilePath
static QgsDataItem* itemFromPath( QgsDataItem* parent, const QString& filePath, const QString& name, const QString& path ) /Factory,PyName=itemFromFilePath/;

@@ -34,7 +34,7 @@ class QgsDateTimeStatisticalSummary
/** Constructor for QgsDateTimeStatisticalSummary
* @param stats flags for statistics to calculate
*/
QgsDateTimeStatisticalSummary( const QgsDateTimeStatisticalSummary::Statistics& stats = All );
QgsDateTimeStatisticalSummary( QgsDateTimeStatisticalSummary::Statistics stats = All );

/** Returns flags which specify which statistics will be calculated. Some statistics
* are always calculated (eg count).
@@ -47,7 +47,7 @@ class QgsDateTimeStatisticalSummary
* @param stats flags for statistics to calculate
* @see statistics
*/
void setStatistics( const Statistics& stats );
void setStatistics( Statistics stats );

/** Resets the calculated values
*/
@@ -124,7 +124,7 @@ class QgsInterval
*/
void setValid( bool valid );

bool operator==( const QgsInterval& other ) const;
bool operator==( QgsInterval other ) const;

/** Converts a string to an interval
* @param string string to parse
@@ -19,7 +19,7 @@ class QgsMapLayerDependency
};

//! Standard constructor
QgsMapLayerDependency( QString layerId, Type type = DataDependency, Origin origin = FromUser );
QgsMapLayerDependency( const QString& layerId, Type type = DataDependency, Origin origin = FromUser );

//! Return the dependency type
Type type() const;
@@ -41,7 +41,7 @@ class QgsMapLayerProxyModel : QSortFilterProxyModel
* @param filters are Filter flags
* @note added in 2.3
*/
QgsMapLayerProxyModel* setFilters( const Filters& filters );
QgsMapLayerProxyModel* setFilters( Filters filters );
const Filters& filters() const;

//! offer the possibility to except some layers to be listed
@@ -38,7 +38,7 @@ class QgsMapRendererCustomPainterJob : QgsMapRendererJob
* Ideally the "wait for finished" method should not be used at all. The code triggering
* rendering should not need to actively wait for rendering to finish.
*/
void waitForFinishedWithEventLoop( const QEventLoop::ProcessEventsFlags& flags = QEventLoop::AllEvents );
void waitForFinishedWithEventLoop( QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents );

/**
* Render the map synchronously in this thread. The function does not return until the map
@@ -122,7 +122,7 @@ class QgsMapSettings
typedef QFlags<QgsMapSettings::Flag> Flags;

//! Set combination of flags that will be used for rendering
void setFlags( const Flags& flags );
void setFlags( Flags flags );
//! Enable or disable a particular flag (other flags are not affected)
void setFlag( Flag flag, bool on = true );
//! Return combination of flags used for rendering
@@ -336,7 +336,7 @@ class QgsProject : QObject
/**
* Set a list of layers which should not be taken into account on map identification
*/
void setNonIdentifiableLayers( QList<QgsMapLayer*> layers );
void setNonIdentifiableLayers( const QList<QgsMapLayer*>& layers );

/**
* Set a list of layers which should not be taken into account on map identification
@@ -30,7 +30,7 @@ class QgsRenderContext
/** Set combination of flags that will be used for rendering.
* @note added in QGIS 2.14
*/
void setFlags( const QgsRenderContext::Flags& flags );
void setFlags( QgsRenderContext::Flags flags );

/** Enable or disable a particular flag (other flags are not affected)
* @note added in QGIS 2.14
@@ -176,7 +176,7 @@ class QgsSnappingConfig
QgsSnappingConfig::IndividualLayerSettings individualLayerSettings( QgsVectorLayer* vl ) const;

//! set individual layer snappings settings (applied if mode is AdvancedConfiguration)
void setIndividualLayerSettings( QgsVectorLayer* vl, QgsSnappingConfig::IndividualLayerSettings individualLayerSettings );
void setIndividualLayerSettings( QgsVectorLayer* vl, const QgsSnappingConfig::IndividualLayerSettings& individualLayerSettings );

/**
* Compare this configuration to other.
@@ -113,7 +113,7 @@ class QgsSQLStatement
* otherwise the original string.
* @see quotedString(), quotedIdentifier()
*/
static QString quotedIdentifierIfNeeded( QString name );
static QString quotedIdentifierIfNeeded( const QString& name );

/** Remove double quotes from an identifier.
* @see quotedIdentifier()
@@ -340,7 +340,7 @@ class QgsSQLStatement
class NodeFunction : QgsSQLStatement::Node
{
public:
NodeFunction( QString name, QgsSQLStatement::NodeList* args /Transfer/ );
NodeFunction( const QString name, QgsSQLStatement::NodeList* args /Transfer/ );
~NodeFunction();

/** Return function name */
@@ -474,7 +474,7 @@ class QgsSQLStatement
{
public:
NodeJoin( QgsSQLStatement::NodeTableDef* tabledef /Transfer/, QgsSQLStatement::Node* onExpr /Transfer/, QgsSQLStatement::JoinType type );
NodeJoin( QgsSQLStatement::NodeTableDef* tabledef /Transfer/, QList<QString> usingColumns, QgsSQLStatement::JoinType type );
NodeJoin( QgsSQLStatement::NodeTableDef* tabledef /Transfer/, const QList<QString>& usingColumns, QgsSQLStatement::JoinType type );

/** Table definition */
QgsSQLStatement::NodeTableDef* tableDef() const;
@@ -525,13 +525,13 @@ class QgsSQLStatement
NodeSelect( QList<QgsSQLStatement::NodeTableDef*> tableList /Transfer/, QList<QgsSQLStatement::NodeSelectedColumn*> columns /Transfer/, bool distinct );

/** Set joins */
void setJoins( QList<QgsSQLStatement::NodeJoin*> joins /Transfer/ );
void setJoins( const QList<QgsSQLStatement::NodeJoin*>& joins /Transfer/ );
/** Append a join */
void appendJoin( QgsSQLStatement::NodeJoin* join /Transfer/ );
/** Set where clause */
void setWhere( QgsSQLStatement::Node* where /Transfer/ );
/** Set order by columns */
void setOrderBy( QList<QgsSQLStatement::NodeColumnSorted*> orderBy /Transfer/ );
void setOrderBy( const QList<QgsSQLStatement::NodeColumnSorted*>& orderBy /Transfer/ );

/** Return the list of tables */
QList<QgsSQLStatement::NodeTableDef*> tables() const;
@@ -44,7 +44,7 @@ class QgsStatisticalSummary
/** Constructor for QgsStatisticalSummary
* @param stats flags for statistics to calculate
*/
QgsStatisticalSummary( const QgsStatisticalSummary::Statistics& stats = QgsStatisticalSummary::All );
QgsStatisticalSummary( QgsStatisticalSummary::Statistics stats = QgsStatisticalSummary::All );

virtual ~QgsStatisticalSummary();

@@ -59,7 +59,7 @@ class QgsStatisticalSummary
* @param stats flags for statistics to calculate
* @see statistics
*/
void setStatistics( const QgsStatisticalSummary::Statistics& stats );
void setStatistics( QgsStatisticalSummary::Statistics stats );

/** Resets the calculated values
*/
@@ -38,7 +38,7 @@ class QgsStringStatisticalSummary
/** Constructor for QgsStringStatistics
* @param stats flags for statistics to calculate
*/
QgsStringStatisticalSummary( const QgsStringStatisticalSummary::Statistics& stats = All );
QgsStringStatisticalSummary( QgsStringStatisticalSummary::Statistics stats = All );

/** Returns flags which specify which statistics will be calculated. Some statistics
* are always calculated (eg count).
@@ -51,7 +51,7 @@ class QgsStringStatisticalSummary
* @param stats flags for statistics to calculate
* @see statistics
*/
void setStatistics( const Statistics& stats );
void setStatistics( Statistics stats );

/** Resets the calculated values
*/
@@ -208,7 +208,7 @@ class QgsVectorFileWriter
QgsWkbTypes::Type overrideGeometryType = QgsWkbTypes::Unknown,
bool forceMulti = false,
bool includeZ = false,
QgsAttributeList attributes = QgsAttributeList(),
const QgsAttributeList& attributes = QgsAttributeList(),
FieldValueConverter* fieldValueConverter = nullptr
);

@@ -253,7 +253,7 @@ class QgsVectorFileWriter
QgsWkbTypes::Type overrideGeometryType = QgsWkbTypes::Unknown,
bool forceMulti = false,
bool includeZ = false,
QgsAttributeList attributes = QgsAttributeList(),
const QgsAttributeList& attributes = QgsAttributeList(),
FieldValueConverter* fieldValueConverter = nullptr
);

@@ -547,7 +547,7 @@ class QgsVectorLayer : QgsMapLayer
* @see deselect(QgsFeatureId)
* @see selectByExpression()
*/
void modifySelection( QgsFeatureIds selectIds, QgsFeatureIds deselectIds );
void modifySelection( const QgsFeatureIds& selectIds, const QgsFeatureIds& deselectIds );

/** Select not selected features and deselect selected ones */
void invertSelection();
@@ -728,7 +728,7 @@ class QgsVectorLayer : QgsMapLayer
*/
bool writeStyle( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const;

bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage, QgsStringMap& props ) const;
bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage, const QgsStringMap& props ) const;
bool readSld( const QDomNode& node, QString& errorMessage );

/**
@@ -31,7 +31,7 @@ class QgsVectorLayerEditBuffer : QObject
virtual bool deleteFeatures( const QgsFeatureIds& fid );

/** Change feature's geometry */
virtual bool changeGeometry( QgsFeatureId fid, QgsGeometry geom );
virtual bool changeGeometry( QgsFeatureId fid, const QgsGeometry& geom );

/** Changed an attribute value (but does not commit it) */
virtual bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );

0 comments on commit 4428908

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