Skip to content

Commit 7f9cc87

Browse files
authored
Merge pull request #3494 from nyalldawson/deprecated
Remove remaining deprecated methods
2 parents a9105b7 + 2a9e520 commit 7f9cc87

File tree

104 files changed

+353
-1988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+353
-1988
lines changed

doc/api_break.dox

+165-1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ This page tries to maintain a list with incompatible changes that happened in pr
178178

179179
<ul>
180180
<li>QgsAttributeAction was removed, and replaced by QgsActionManager.</li>
181+
<li>QgsAttributeEditor was removed. Use QgsEditorWidgetRegistry::create() instead.</li>
181182
<li>QgsColorbutton was removed. QgsColorButtonV2 has now been renamed to QgsColorButton. Hence, QgsColorButtonV2 does not exist anymore.</li>
182183
<li>QgsColorDialog was removed, and QgsColorDialogV2 was renamed to QgsColorDialog. Hence, QgsColorButtonV2 does not exist anymore.
183184
All the functionality from the old QgsColorDialog has been moved to the new class.</li>
@@ -266,7 +267,8 @@ corresponding counterparts in QgsUnitTypes should be used instead.</li>
266267
\subsection qgis_api_break_3_0_QgisInterface QgisInterface
267268

268269
<ul>
269-
<li>fileMenu() has been removed, use projectMenu() instead.
270+
<li>fileMenu() has been removed, use projectMenu() instead.</li>
271+
<li>actionRemoveLayer was removed as it no longer exists.</li>
270272
</ul>
271273

272274
\subsection qgis_api_break_3_0_QgsAnnotation QgsAnnotation
@@ -283,6 +285,7 @@ corresponding counterparts in QgsUnitTypes should be used instead.</li>
283285
<li>The doAction() variant which takes a QgsFeature along has been removed. Use the expression context
284286
variant instead.</li>
285287
<li>expandAction() has been removed. Use QgsExpression::replaceExpressionText() instead.</li>
288+
<li>setPythonExecute() was removed. Initialize QgsPythonRunner instead.</li>
286289
</ul>
287290

288291
\subsection qgis_api_break_3_0_QgsAdvancedDigitizingDockWidget QgsAdvancedDigitizingDockWidget
@@ -306,6 +309,22 @@ and setSortKeyAttributeName() instead.</li>
306309
<li>currentFeature() was removed. Use feature() instead.</li>
307310
</ul>
308311

312+
\subsection qgis_api_break_3_0_QgsAttributeDialog QgsAttributeDialog
313+
314+
<ul>
315+
<li>The constructor for QgsAttributeDialog has changed</li>
316+
<li>dialog() was removed - just use the object directly.</li>
317+
<li>setIsAddDialog() was removed. Use setMode() instead.</li>
318+
</ul>
319+
320+
\subsection qgis_api_break_3_0_QgsAttributeForm QgsAttributeForm
321+
322+
<ul>
323+
<li>setIsAddDialog() was removed. Use setMode() instead.</li>
324+
<li>accept() was removed. Use save() instead.</li>
325+
<li>reject() was removed. Use resetValues() instead.</li>
326+
</ul>
327+
309328
\subsection qgis_api_break_3_0_QgsAuthConfigUriEdit QgsAuthConfigUriEdit
310329

311330
<ul>
@@ -318,6 +337,11 @@ and setSortKeyAttributeName() instead.</li>
318337
<li>GenericDataSourceURI has been renamed to GenericDataSourceUri</li>
319338
</ul>
320339

340+
\subsection qgis_api_break_3_0_QgsQgsCachedFeatureIterator QgsCachedFeatureIterator
341+
<ul>
342+
<li>The constructor for QgsCachedFeatureIterator has changed.</li>
343+
</ul>
344+
321345
\subsection qgis_api_break_3_0_QgsCategorizedSymbolRendererWidget QgsCategorizedSymbolRendererWidget
322346
<ul>
323347
<li>sizeScaleFieldChanged() and scaleMethodChanged() were removed. These settings are no longer exposed in the widget's GUI.</li>
@@ -337,6 +361,12 @@ and the new ramp can be retrieved after executing the dialog by calling ramp().<
337361
<li>Some internal methods which were previously public or protected were made private.</li>
338362
</ul>
339363

364+
\subsection qgis_api_break_3_0_QgsColorRampShader QgsColorRampShader
365+
366+
<ul>
367+
<li>maximumColorCacheSize() and setMaximumColorCacheSize() were no longer used and are removed.</li>
368+
</ul>
369+
340370
\subsection qgis_api_break_3_0_QgsComposerArrow QgsComposerArrow
341371

342372
<ul>
@@ -547,6 +577,10 @@ and the new ramp can be retrieved after executing the dialog by calling ramp().<
547577
<ul>
548578
<li>expressionParams(), setExpressionParams() and insertExpressionParam() have been removed.
549579
QgsExpressionContext variables should be used in their place.</li>
580+
<li>prepareExpression( QgsVectorLayer* layer ) and prepareExpression( const QgsFields &fields )
581+
were removed. Use QgsExpressionContext variant instead.</li>
582+
<li>referencedColumns( QgsVectorLayer* layer ) and referencedColumns( const QgsFields& fields )
583+
were removed. Use QgsExpressionContext variant instead.</li>
550584
</ul>
551585

552586
\subsection qgis_api_break_3_0_QgsDataDefinedButton QgsDataDefinedButton
@@ -597,6 +631,12 @@ Use renderDiagram( const QgsFeature& feature, QgsRenderContext& c, const QgsDiag
597631
Use diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) instead.
598632
</ul>
599633

634+
\subsection qgis_api_break_3_0_QgsDiagramRenderer QgsDiagramRenderer
635+
636+
<ul>
637+
<li>xform, fields were no longer required and are removed.</li>
638+
</ul>
639+
600640
\subsection qgis_api_break_3_0_QgsDiagramLayerSettings QgsDiagramLayerSettings
601641

602642
<ul>
@@ -607,6 +647,33 @@ place of a null pointer.</li>
607647
<li>The ct member has been removed. Use coordinateTransform() and setCoordinateTransform() instead.
608648
</ul>
609649

650+
\subsection qgis_api_break_3_0_QgsDiagramSettings QgsDiagramSettings
651+
652+
<ul>
653+
<li>The SizeType enum was removed. Use QgsUnitTypes.RenderUnit instead.</li>
654+
</ul>
655+
656+
\subsection qgis_api_break_3_0_QgsDistanceArea QgsDistanceArea
657+
658+
<ul>
659+
<li>sourceCrs() now returns a QgsCoordinateReferenceSystem instead of the crs ID.</li>
660+
<li>measure() has been removed. Use measureArea() or measureLength() instead.</li>
661+
<li>textUnit() was removed. Use formatDistance() or formatArea() instead.</li>
662+
<li>convertMeasurement was removed. Use QgsUnitTypes for conversion instead.</li>
663+
</ul>
664+
665+
\subsection qgis_api_break_3_0_QgsDxfExport QgsDxfExport
666+
667+
<ul>
668+
<li>The writeGroup() method taking a QgsPoint argument was removed. Use the version which takes a QgsPointV2 instead.</li>
669+
<li>The writePolyline() method taking a QgsPolyline argument was removed. Use the alternative version instead.</li>
670+
<li>The writePolygon() method taking a QgsPolygon argument was removed. Use the version which takes a QgsRingSequence instead.</li>
671+
<li>writeSolid() was removed. Use writePolygon() instead.</li>
672+
<li>The signature for writeLine() has changed.</li>
673+
<li>writePoint(), writeFilledCircle(), writeCircle(), writeText() and writeMText() now take QgsPointV2 arguments</li>
674+
675+
</ul>
676+
610677
\subsection qgis_api_break_3_0_QgsEditFormConfig QgsEditFormConfig
611678

612679
<ul>
@@ -772,6 +839,10 @@ plugins calling this method will need to be updated.</li>
772839

773840
<ul>
774841
<li>init(QgsMapRenderer*) has been removed. Use init(const QgsMapSettings&) instead.</li>
842+
<li>&layer() was removed. use QgsPalLayerSettings::fromLayer() instead.</li>
843+
<li>addDiagramLayer() was removed. Use prepareDiagramLayer() instead.</li>
844+
<li>labelsAtPosition() was removed. Use takeResults() and methods of QgsLabelingResults instead.</li>
845+
<li>labelsWithinRect() was removed. Use takeResults() and methods of QgsLabelingResults.</li>
775846
</ul>
776847

777848
\subsection qgis_api_break_3_0_QgsLayerTreeGroup QgsLayerTreeGroup
@@ -780,6 +851,20 @@ plugins calling this method will need to be updated.</li>
780851
<li>readChildrenFromXML() has been renamed to readChildrenFromXml()</li>
781852
</ul>
782853

854+
\subsection qgis_api_break_3_0_QgsLayerTreeMode QgsLayerTreeModel
855+
856+
<ul>
857+
<li>The ShowSymbology flag was removed. Use ShowLegend instead.</li>
858+
<li>The AllowSymbologyChangeState flag was removed. Use AllowLegendChangeState instead.</li>
859+
<li>legendFilterByMap() was renamed to legendFilterMapSettings()</li>
860+
<li>isIndexSymbologyNode() was removed. Use index2legendNode() instead.</li>
861+
<li>layerNodeForSymbologyNode() was removed. Use index2legendNode()->parent() instead.</li>
862+
<li>refreshLayerSymbology() was removed. Use refreshLayerLegend() instead.</li>
863+
<li>setAutoCollapseSymbologyNodes() was removed. Use setAutoCollapseLegendNodes() instead.</li>
864+
<li>autoCollapseSymbologyNodes() was removed. Use autoCollapseLegendNodes() instead.</li>
865+
</ul>
866+
867+
783868
\subsection qgis_api_break_3_0_QgsLayerTreeNode QgsLayerTreeNode
784869

785870
<ul>
@@ -812,6 +897,12 @@ and the new ramp can be retrieved after executing the dialog by calling ramp().<
812897
<li>setProgress() signal has been removed. It was not emitted since 2.0.</li>
813898
</ul>
814899

900+
\subsection qgis_api_break_3_0_QgsMapCanvasItem QgsMapCanvasItem
901+
902+
<ul>
903+
<li>setPanningOffset() was removed.</li>
904+
</ul>
905+
815906
\subsection qgis_api_break_3_0_QgsMapLayer QgsMapLayer
816907

817908
<ul>
@@ -836,6 +927,12 @@ screenUpdateRequested() were removed. These members have had no effect for a num
836927
<li>writeLayerXML() was renamed to writeLayerXml()</li>
837928
</ul>
838929

930+
\subsection qgis_api_break_3_0_QgsMapLayerRegistry QgsMapLayerRegistry
931+
932+
<ul>
933+
<li>clearAllLayerCaches() was removed. This method has had no effect since QGIS 2.4</li>
934+
</ul>
935+
839936
\subsection qgis_api_break_3_0_QgsMapOverviewCanvas QgsMapOverviewCanvas
840937

841938
<ul>
@@ -860,6 +957,27 @@ be used instead of a null pointer if no transformation is required.</li>
860957
<li>drawOldLabeling(), drawNewLabeling() were removed. The method drawLabeling() should be used instead.</li>
861958
</ul>
862959

960+
\subsection qgis_api_break_3_0_QgsMapTool QgsMapTool
961+
962+
<ul>
963+
<li>renderComplete() was removed. Map tools must not directly depend on rendering progress.</li>
964+
<li>isTransient() and isEditTool() were removed. Use flags() instead.</li>
965+
</ul>
966+
967+
\subsection qgis_api_break_3_0_QgsMapToolCapture QgsMapToolCapture
968+
969+
<ul>
970+
<li>The nextPoint() method taking a QgsPoint was removed. Use the version taking a QgsPointV2 instead.</li>
971+
</ul>
972+
973+
\subsection qgis_api_break_3_0_QgsMapToPixel QgsMapToPixel
974+
975+
<ul>
976+
<li>The constructor now uses the map center x and y, and requires both height and width in pixels and a rotation value</li>
977+
<li>setYMaximum(), setYMinimum(), setXMinimum() were removed. Use setParameters() instead</li>
978+
979+
</ul>
980+
863981
\subsection qgis_api_break_3_0_QgsMapToPixelGeometrySimplifier QgsMapToPixelGeometrySimplifier
864982

865983
The whole class has been refactored to stop using WKB and to use QgsAbstractGeometry classes.
@@ -889,12 +1007,26 @@ plugins calling this method will need to be updated.</li>
8891007
<li>Constructor taking QgsLayerItem argument has been removed. Use QgsDataItem::mimeUri() instead.</li>
8901008
</ul>
8911009

1010+
\subsection qgis_api_break_3_0_QgsNetworkAccessManager QgsNetworkAccessManager
1011+
1012+
<ul>
1013+
<li>sendGet() was removed. Use get() directly.</li>
1014+
<li>deleteReply() was removed. Use abort() and deleteLayer() on the reply directly.</li>
1015+
<li>requestSent signal was removed. This is no longer emitted.</li>
1016+
</ul>
1017+
8921018
\subsection qgis_api_break_3_0_QgsOSMElement QgsOSMElement
8931019

8941020
<ul>
8951021
<li>elemID() has been renamed to elemId()</li>
8961022
</ul>
8971023

1024+
\subsection qgis_api_break_3_0_QgsOwsConnection QgsOwsConnection
1025+
1026+
<ul>
1027+
<li>connectionInfo() was removed.</li>
1028+
</ul>
1029+
8981030
\subsection qgis_api_break_3_0_QgsOWSSourceSelect QgsOWSSourceSelect
8991031

9001032
<ul>
@@ -925,6 +1057,12 @@ and for forcing certain items to always sort on top.</li>
9251057
<ul>
9261058
<li>init(QgsMapRenderer*) has been removed. Use init(const QgsMapSettings&) instead.</li>
9271059
<li>prepareGeometry and geometryRequiresPreparation now take geometry references, not pointers.</li>
1060+
<li>layer() was removed. If direct access to QgsPalLayerSettings is necessary, use QgsPalLayerSettings::fromLayer()</li>
1061+
<li>candidates() was removed.</li>
1062+
<li>addDiagramLayer() was removed. Use prepareDiagramLayer() instead.</li>
1063+
<li>labelsAtPosition() was removed. Use takeResults() and methods of QgsLabelingResults instead.</li>
1064+
<li>labelsWithinRect() was removed. Use takeResults() and methods of QgsLabelingResults instead.</li>
1065+
<li>isStoredWithProject() and setStoredWithProject() had no effect and were removed.</li>
9281066
</ul>
9291067

9301068
\subsection qgis_api_break_3_0_QgsPalLayerSettings QgsPalLayerSettings
@@ -956,6 +1094,9 @@ plugins calling this method will need to be updated.</li>
9561094

9571095
<ul>
9581096
<li>visibilityPresetCollection() has been renamed to mapThemeCollection()</li>
1097+
<li>title( const QString & title ) was removed. Use setTitle() instead.</li>
1098+
<li>dirty( bool b ) was removed. Use setDirty() instead.</li>
1099+
<li>clearProperties() was removed. Use clear() instead.</li>
9591100
</ul>
9601101

9611102
\subsection qgis_api_break_3_0_QgsRasterCalcNode QgsRasterCalcNode
@@ -982,6 +1123,14 @@ plugins calling this method will need to be updated.</li>
9821123
<li>block() has new "feedback" argument.</li>
9831124
</ul>
9841125

1126+
\subsection qgis_api_break_3_0_QgsRasterLayer QgsRasterLayer
1127+
1128+
<ul>
1129+
<li>setDrawingStyle() was removed. Use setRendererForDrawingStyle() or setRenderer() instead.</li>
1130+
<li>previewAsPixmap() was removed. Use previewAsImage() instead.</li>
1131+
<li>updateProgress() had no effect and was removed.</li>
1132+
</ul>
1133+
9851134
\subsection qgis_api_break_3_0_QgsRasterProjector QgsRasterProjector
9861135

9871136
<ul>
@@ -1061,6 +1210,14 @@ be returned instead of a null pointer if no transformation is required.</li>
10611210

10621211
<ul>
10631212
<li>Constructor variant with QgsMapRenderer has been removed. Use the variant with QgsMapSettings.</li>
1213+
<li>Signature for snapPoint() has changed.</li>
1214+
</ul>
1215+
1216+
\subsection qgis_api_break_3_0_QgsSublayersDialog QgsSublayersDialog
1217+
1218+
<ul>
1219+
<li>populateLayerTable() now takes a list of QgsSublayersDialog.LayerDefinition values</li>
1220+
<li>selectionNames() and selectionIndexes() were removed. Use selection().</li>
10641221
</ul>
10651222

10661223
\subsection qgis_api_break_3_0_QgsSvgCache QgsSvgCache
@@ -1127,6 +1284,7 @@ than an integer value</li>
11271284

11281285
<ul>
11291286
<li>vertexSearchRadius(), defaultTolerance(), toleranceInMapUnits() do not have variant with QgsMapRenderer anymore. Use the variants with QgsMapSettings.</li>
1287+
<li>The MapUnits UnitType was removed. Use LayerUnits or ProjectUnits instead.</li>
11301288
</ul>
11311289

11321290
\subsection qgis_api_break_3_0_QgsTreeWidgetItem QgsTreeWidgetItem
@@ -1153,6 +1311,12 @@ Radians (to AngleRadians), Gon (to AngleGon), MinutesOfArc (to AngleMinutesOfArc
11531311
SecondsOfArc (to AngleSecondsOfArc), Turn (to AngleTurn) and UnknownAngleUnit to AngleUnknownUnit</li>
11541312
</ul>
11551313

1314+
\subsection qgis_api_break_3_0_QgsVector QgsVector
1315+
1316+
<ul>
1317+
<li>normal() was removed. Use normalized() instead.</li>
1318+
</ul>
1319+
11561320
\subsection qgis_api_break_3_0_QgsVectorDataProvider QgsVectorDataProvider
11571321

11581322
<ul>

0 commit comments

Comments
 (0)