Skip to content

Commit 3c544cd

Browse files
authored
Merge pull request #3319 from nyalldawson/consistency
Make API naming more consistent
2 parents 44c8680 + 2685a90 commit 3c544cd

File tree

414 files changed

+2110
-1912
lines changed

Some content is hidden

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

414 files changed

+2110
-1912
lines changed

doc/api_break.dox

Lines changed: 180 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,76 @@ This page tries to maintain a list with incompatible changes that happened in pr
2424
<li>QgsLabel and QgsLabelAttributes. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
2525
</ul>
2626

27+
\subsection qgis_api_break_3_0_global General changes
28+
29+
<ul>
30+
<li>All setDestinationCRS() methods have been renamed to setDestinationCrs()</li>
31+
<li>All destinationCRS() methods have been renamed to destinationCrs()</li>
32+
<li>All readXML() and _readXML() methods have been renamed to readXml() and _readXml()</li>
33+
<li>All writeXML() and _writeXML() methods have been renamed to writeXml() and _writeXml()</li>
34+
<li>All setLayerID() methods have been renamed to setLayerId()</li>
35+
<li>All layerID() methods have been renamed to layerId()</li>
36+
<li>All setCRS() methods have been renamed to setCrs()</li>
37+
<li>All srcCrs() methods have been renamed to sourceCrs()</li>
38+
<li>All destCrs() methods have been renamed to destinationCrs()</li>
39+
<li>All exportXML() methods have been renamed to exportXml()</li>
40+
<li>All importXML() methods have been renamed to importXml()</li>
41+
42+
</ul>
43+
44+
\subsection qgis_api_break_3_0_QgsAuthConfigUriEdit QgsAuthConfigUriEdit
45+
46+
<ul>
47+
<li>hasConfigID() has been renamed to hasConfigId()</li>
48+
</ul>
49+
50+
\subsection qgis_api_break_3_0_QgsAtlasComposition QgsAtlasComposition
51+
52+
<ul>
53+
<li>readXMLMapSettings() has been renamed to readXmlMapSettings()</li>
54+
</ul>
55+
56+
\subsection qgis_api_break_3_0_QgsComposerLegendItem QgsComposerLegendItem
57+
58+
<ul>
59+
<li>writeXMLChildren() has been renamed to writeXmlChildren()</li>
60+
</ul>
61+
62+
\subsection qgis_api_break_3_0_QgsComposerMap QgsComposerMap
63+
64+
<ul>
65+
<li>containsWMSLayer() has been renamed to containsWmsLayer()</li>
66+
</ul>
67+
68+
\subsection qgis_api_break_3_0_QgsComposerNodesItem QgsComposerNodesItem
69+
70+
<ul>
71+
<li>_readXMLStyle() has been renamed to _readXmlStyle()</li>
72+
<li>_writeXMLStyle() has been renamed to _writeXMLStyle()</li>
73+
</ul>
74+
75+
\subsection qgis_api_break_3_0_QgsComposerTable QgsComposerTable
76+
77+
<ul>
78+
<li>tableWriteXML() has been renamed to tableWriteXml()</li>
79+
<li>tableReadXML() has been renamed to tableReadXml()</li>
80+
</ul>
81+
82+
83+
\subsection qgis_api_break_3_0_QgsComposition QgsComposition
84+
85+
<ul>
86+
<li>addItemsFromXML() has been renamed to addItemsFromXml()</li>
87+
</ul>
88+
89+
\subsection qgis_api_break_3_0_QgsCoordinateReferenceSystem QgsCoordinateReferenceSystem
90+
91+
<ul>
92+
<li>setCustomSrsValidation() has been renamed to setCustomCrsValidation()</li>
93+
<li>saveAsUserCRS() has been renamed to saveAsUserCrs()</li>
94+
<li>geographicCRSAuthId() has been renamed to geographicCrsAuthId()</li>
95+
</ul>
96+
2797
\subsection qgis_api_break_3_0_QgsCoordinateTransform QgsCoordinateTransform
2898

2999
<ul>
@@ -50,13 +120,32 @@ plugins calling these methods will need to be updated.</li>
50120
be returned in place of a null pointer.</li>
51121
</ul>
52122

123+
\subsection qgis_api_break_3_0_QgsCptCitySelectionItem QgsCptCitySelectionItem
124+
125+
<ul>
126+
<li>parseXML() has been renamed to parseXml()</li>
127+
</ul>
128+
129+
\subsection qgis_api_break_3_0_QgsCRSCache QgsCRSCache
130+
131+
<ul>
132+
<li>QgsCRSCache has been renamed to QgsCrsCache</li>
133+
<li>updateCRSCache() has been renamed to updateCrsCache</li>
134+
</ul>
135+
53136
\subsection qgis_api_break_3_0_QgsDataDefinedSymbolDialog QgsDataDefinedSymbolDialog
54137

55138
<ul>
56139
<li>QgsDataDefinedSymbolDialog was removed. Code using this dialog should be reworked to use QgsDataDefinedButton
57140
instead.</li>
58141
</ul>
59142

143+
\subsection qgis_api_break_3_0_QgsDataItem QgsDataItem
144+
145+
<ul>
146+
<li>supportedCRS() has been renamed to supportedCrs()</li>
147+
</ul>
148+
60149
\subsection qgis_api_break_3_0_QgsDiagramLayerSettings QgsDiagramLayerSettings
61150

62151
<ul>
@@ -89,6 +178,12 @@ attributeIndexes(), pkAttributeIndexes(), isSaveAndLoadStyleToDBSupported()</li>
89178
</li>
90179
</ul>
91180

181+
\subsection qgis_api_break_3_0_QgsGroupWMSDataDialog QgsGroupWMSDataDialog
182+
183+
<ul>
184+
<li>QgsGroupWMSDataDialo has been renamed to QgsGroupWmsDataDialog</li>
185+
</ul>
186+
92187
\subsection qgis_api_break_3_0_DataProviders Data Providers
93188

94189
<ul>
@@ -97,6 +192,19 @@ objects are implicitly shared, returning a copy helps simplify and make code mor
97192
only affects third party c++ providers, and does not affect PyQGIS scripts.</li>
98193
</ul>
99194

195+
\subsection qgis_api_break_3_0_QgsLayerTreeGroup QgsLayerTreeGroup
196+
197+
<ul>
198+
<li>readChildrenFromXML() has been renamed to readChildrenFromXml()</li>
199+
</ul>
200+
201+
\subsection qgis_api_break_3_0_QgsLayerTreeNode QgsLayerTreeNode
202+
203+
<ul>
204+
<li>readCommonXML() has been renamed to readCommonXml()</li>
205+
<li>writeCommonXML() has been renamed to writeCommonXml()</li>
206+
</ul>
207+
100208
\subsection qgis_api_break_3_0_QgsMapCanvas QgsMapCanvas
101209

102210
<ul>
@@ -121,13 +229,22 @@ screenUpdateRequested() were removed. These members have had no effect for a num
121229
<li>The layerCrsChanged() signal was renamed to crsChanged()</li>
122230
<li>theError parameter in appendError() and setError() were renamed to 'error'.</li>
123231
<li>drawLabels() method was removed. It used old deprecated labeling. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
232+
<li>readLayerXML() was renamed to readLayerXml()</li>
233+
<li>writeLayerXML() was renamed to writeLayerXml()</li>
234+
</ul>
235+
236+
\subsection qgis_api_break_3_0_QgsMapOverviewCanvas QgsMapOverviewCanvas
237+
238+
<ul>
239+
<li>destinationSrsChanged() was renamed to destinationCrsChanged()</li>
124240
</ul>
125241

126242
\subsection qgis_api_break_3_0_QgsMapRenderer QgsMapRenderer
127243

128244
<ul>
129245
<li>transformation() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
130246
be returned instead of a null pointer if no transformation is required.</li>
247+
<li>destinationSrsChanged() was renamed to destinationCrsChanged()</li>
131248
</ul>
132249

133250
\subsection qgis_api_break_3_0_QgsMapRendererJob QgsMapRendererJob
@@ -146,6 +263,52 @@ be used instead of a null pointer if no transformation is required.</li>
146263
be returned instead of a null pointer if no transformation is required.</li>
147264
</ul>
148265

266+
\subsection qgis_api_break_3_0_QgsOSMElement QgsOSMElement
267+
268+
<ul>
269+
<li>elemID() has been renamed to elemId()</li>
270+
</ul>
271+
272+
\subsection qgis_api_break_3_0_QgsOWSSourceSelect QgsOWSSourceSelect
273+
274+
<ul>
275+
<li>selectedLayersCRSs() has been renamed selectedLayersCrses()</li>
276+
<li>populateCRS() has been renamed to populateCrs()</li>
277+
<li>clearCRS() has been renamed to clearCrs()</li>
278+
<li>addWMSListRow() has been renamed to addWmsListRow()</li>
279+
<li>addWMSListItem() has been renamed to addWmsListItem()</li>
280+
<li>selectedCRS() has been renamed to selectedCrs()</li>
281+
</ul>
282+
283+
\subsection qgis_api_break_3_0_QgsOWSConnection QgsOWSConnection
284+
285+
<ul>
286+
<li>QgsOWSConnection has been renamed QgsOwsConnection</li>
287+
</ul>
288+
289+
\subsection qgis_api_break_3_0_QgsRasterDataProvider QgsRasterDataProvider
290+
291+
<ul>
292+
<li>srcDataType() has been renamed to sourceDataType()</li>
293+
<li>srcHasNoDataValue() has been renamed to sourceHasNoDataValue()</li>
294+
<li>useSrcNoDataValue() has been renamed to useSourceNoDataValue()</li>
295+
<li>setUseSrcNoDataValue() has been renamed to setUseSourceNoDataValue()</li>
296+
<li>srcNoDataValue() has been renamed to sourceNoDataValue()</li>
297+
</ul>
298+
299+
\subsection qgis_api_break_3_0_QgsRasterInterface QgsRasterInterface
300+
301+
<ul>
302+
<li>srcDataType() has been renamed to sourceDataType()</li>
303+
<li>srcInput() has been renamed to sourceInput()</li>
304+
</ul>
305+
306+
\subsection qgis_api_break_3_0_QgsRelation QgsRelation
307+
308+
<ul>
309+
<li>createFromXML() has been renamed to createFromXml()</li>
310+
</ul>
311+
149312
\subsection qgis_api_break_3_0_QgsRenderContext QgsRenderContext
150313

151314
<ul>
@@ -169,6 +332,15 @@ be used instead of a null pointer if no transformation is required.</li>
169332
plugins calling this method will need to be updated.</li>
170333
</ul>
171334

335+
\subsection qgis_api_break_3_0_QgsVectorLayer QgsVectorLayer
336+
337+
<ul>
338+
<li>excludeAttributesWMS() and setExcludeAttributesWMS() have been renamed to excludeAttributesWms() and
339+
setExcludeAttributesWms()</li>
340+
<li>excludeAttributesWFS() and setExcludeAttributesWFS() have been renamed to excludeAttributesWfs() and
341+
setExcludeAttributesWfs()</li>
342+
</ul>
343+
172344
\subsection qgis_api_break_3_0_QgsVectorLayerImport QgsVectorLayerImport
173345

174346
<ul>
@@ -183,7 +355,9 @@ in code which previously passed a null pointer to QgsVectorLayerImport.</li>
183355
<ul>
184356
<li>The constructor now takes a reference rather than a pointer to a CRS. This has no effect on PyQGIS code, but c++
185357
plugins calling this method will need to be updated.</li>
186-
<li>destCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
358+
<li>The destCRS parameter in the constructor has been renamed to destinationCrs.</li>
359+
<li>destCRS() has been renamed to destinationCrs()</li>
360+
<li>destinationCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
187361
plugins calling this method will need to be updated.</li>
188362
</ul>
189363

@@ -248,6 +422,11 @@ and deletedFeatureIds() functions now return values, not references. This has no
248422
plugins calling these methods will need to be updated.</li>
249423
</ul>
250424

425+
\subsection qgis_api_break_3_0_QgsWMSLegendNode QgsWMSLegendNode
426+
427+
<ul>
428+
<li>QgsWMSLegendNode has been renamed to QgsWmsLegendNode</li>
429+
</ul>
251430

252431

253432
\section qgis_api_break_2_4 QGIS 2.4

python/analysis/openstreetmap/qgsosmbase.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class QgsOSMElement
3232
bool isValid() const;
3333

3434
// fetched automatically from DB
35-
QgsOSMElementID elemID() const;
35+
QgsOSMElementID elemId() const;
3636
qint64 id() const;
3737
//QString username() const;
3838
//QDateTime timestamp() const;

python/analysis/raster/qgsalignraster.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ class QgsAlignRaster
118118
QSizeF cellSize() const;
119119

120120
//! Set the output CRS in WKT format
121-
void setDestinationCRS( const QString& crsWkt );
121+
void setDestinationCrs( const QString& crsWkt );
122122
//! Get the output CRS in WKT format
123-
QString destinationCRS() const;
123+
QString destinationCrs() const;
124124

125125
//! Configure clipping extent (region of interest).
126126
//! No extra clipping is done if the rectangle is null

python/core/composer/qgsatlascomposition.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ public:
179179
/** Returns the current filename. Must be called after prepareForFeature() */
180180
QString currentFilename() const;
181181

182-
void writeXML( QDomElement& elem, QDomDocument& doc ) const;
182+
void writeXml( QDomElement& elem, QDomDocument& doc ) const;
183183

184184
/** Reads general atlas settings from xml
185185
* @param elem a QDomElement holding the atlas properties.
186186
* @param doc QDomDocument for the source xml.
187187
* @see readXMLMapSettings
188188
* @note This method should be called before restoring composer item properties
189189
*/
190-
void readXML( const QDomElement& elem, const QDomDocument& doc );
190+
void readXml( const QDomElement& elem, const QDomDocument& doc );
191191

192192
/** Reads old (pre 2.2) map related atlas settings from xml
193193
* @param elem a QDomElement holding the atlas map properties.
@@ -196,7 +196,7 @@ public:
196196
* @note This method should be called after restoring composer item properties
197197
* @note added in version 2.5
198198
*/
199-
void readXMLMapSettings( const QDomElement& elem, const QDomDocument& doc );
199+
void readXmlMapSettings( const QDomElement& elem, const QDomDocument& doc );
200200

201201
QgsComposition* composition();
202202

python/core/composer/qgscomposerarrow.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ class QgsComposerArrow: QgsComposerItem
174174
* @param elem is DOM element corresponding to 'Composer' tag
175175
* @param doc document
176176
*/
177-
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
177+
bool writeXml( QDomElement& elem, QDomDocument & doc ) const;
178178

179179
/** Sets state from DOM document
180180
* @param itemElem is DOM node corresponding to item tag
181181
* @param doc is the document to read
182182
*/
183-
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
183+
bool readXml( const QDomElement& itemElem, const QDomDocument& doc );
184184
};

python/core/composer/qgscomposerattributetable.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ class QgsComposerAttributeTable : QgsComposerTable
4848
* @param doc QDomDocument for the destination xml.
4949
* @see readXML
5050
*/
51-
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
51+
bool writeXml( QDomElement& elem, QDomDocument & doc ) const;
5252

5353
/** Reads the properties specific to an attribute table from xml.
5454
* @param itemElem a QDomElement holding the attribute table's desired properties.
5555
* @param doc QDomDocument for the source xml.
5656
* @see writeXML
5757
*/
58-
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
58+
bool readXml( const QDomElement& itemElem, const QDomDocument& doc );
5959

6060
/** Sets the vector layer from which to display feature attributes
6161
* @param layer Vector layer for attribute table

python/core/composer/qgscomposerattributetablev2.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
5252
* @param ignoreFrames ignore frames
5353
* @see readXML
5454
*/
55-
virtual bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
55+
virtual bool writeXml( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
5656

5757
/** Reads the properties specific to an attribute table from xml.
5858
* @param itemElem a QDomElement holding the attribute table's desired properties.
5959
* @param doc QDomDocument for the source xml.
6060
* @param ignoreFrames ignore frames
6161
* @see writeXML
6262
*/
63-
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
63+
virtual bool readXml( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
6464

6565
virtual void addFrame( QgsComposerFrame* frame /Transfer/, bool recalcFrameSizes = true );
6666

python/core/composer/qgscomposerframe.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class QgsComposerFrame: QgsComposerItem
3131
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
3232
void beginItemCommand( const QString& text );
3333
void endItemCommand();
34-
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
35-
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
34+
bool writeXml( QDomElement& elem, QDomDocument & doc ) const;
35+
bool readXml( const QDomElement& itemElem, const QDomDocument& doc );
3636
int type() const;
3737

3838
/** Returns the visible portion of the multi frame's content which

python/core/composer/qgscomposerhtml.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ class QgsComposerHtml: QgsComposerMultiFrame
174174
virtual QString displayName() const;
175175
QSizeF totalSize() const;
176176
void render( QPainter* p, const QRectF& renderExtent, const int frameIndex );
177-
bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
178-
bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
177+
bool writeXml( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
178+
bool readXml( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
179179
void addFrame( QgsComposerFrame* frame /Transfer/, bool recalcFrameSizes = true );
180180
//overridden to break frames without dividing lines of text
181181
double findNearbyPageBreak( double yPos );

python/core/composer/qgscomposeritem.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
282282
virtual void setSceneRect( const QRectF& rectangle );
283283

284284
/** Writes parameter that are not subclass specific in document. Usually called from writeXML methods of subclasses*/
285-
bool _writeXML( QDomElement& itemElem, QDomDocument& doc ) const;
285+
bool _writeXml( QDomElement& itemElem, QDomDocument& doc ) const;
286286

287287
/** Reads parameter that are not subclass specific in document. Usually called from readXML methods of subclasses*/
288-
bool _readXML( const QDomElement& itemElem, const QDomDocument& doc );
288+
bool _readXml( const QDomElement& itemElem, const QDomDocument& doc );
289289

290290
/** Whether this item has a frame or not.
291291
* @returns true if there is a frame around this item, otherwise false.

0 commit comments

Comments
 (0)