Skip to content

Commit 7911994

Browse files
committed
Replace capitalise by capitalize
1 parent 5e87155 commit 7911994

File tree

10 files changed

+26
-24
lines changed

10 files changed

+26
-24
lines changed

doc/api_break.dox

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
202202
<tr><td>QgsApplication<td>userStyleV2Path<td>userStylePath
203203
<tr><td>QgsComposerShape<td>setUseSymbolV2<td>setUseSymbol
204204
<tr><td>QgsIFeatureSelectionManager<td>selectedFeaturesIds<td>selectedFeatureIds
205+
<tr><td>QgsMapLayer<td>capitaliseLayerName<td>capitalizeLayerName
205206
<tr><td>QgsSymbolLayerUtils<td>createSymbolLayerV2ListFromSld<td>createSymbolLayerListFromSld
206207
<tr><td>QgsVectorLayer<td>editorWidgetV2Config<td>editorWidgetConfig
207208
<tr><td>QgsVectorLayer<td>editorWidgetV2Text<td>editorWidgetText
@@ -309,7 +310,7 @@ Data Providers {#qgis_api_break_3_0_DataProviders}
309310
Qgis {#qgis_api_break_3_0_Qgis}
310311
----
311312

312-
- The QGis class was renamed to Qgis for capitalisation consistency with other class names
313+
- The QGis class was renamed to Qgis for capitalization consistency with other class names
313314
- permissiveToDouble() and permissiveToInt() where moved out of the QGis class and renamed to qgsPermissiveToDouble() and
314315
qgsPermissiveToInt()
315316
- The constants DEFAULT_IDENTIFY_RADIUS and MINIMUM_POINT_SIZE were removed
@@ -1130,6 +1131,7 @@ screenUpdateRequested() were removed. These members have had no effect for a num
11301131
- drawLabels() method was removed. It used old deprecated labeling. Replaced by labeling based on PAL library, see QgsLabelingEngine.
11311132
- readLayerXML() was renamed to readLayerXml()
11321133
- writeLayerXML() was renamed to writeLayerXml()
1134+
- capitaliseLayerName() was renamed to capitalizeLayerName()
11331135

11341136

11351137
QgsMapLayerRegistry {#qgis_api_break_3_0_QgsMapLayerRegistry}

python/core/qgsmaplayer.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ class QgsMapLayer : QObject
395395
/** Sets layer's spatial reference system */
396396
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );
397397

398-
/** A convenience function to (un)capitalise the layer name */
399-
static QString capitaliseLayerName( const QString& name );
398+
/** A convenience function to (un)capitalize the layer name */
399+
static QString capitalizeLayerName( const QString& name );
400400

401401
/** Retrieve the style URI for this layer
402402
* (either as a .qml file on disk or as a

src/app/qgisapp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9118,7 +9118,7 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
91189118
QSettings mySettings;
91199119
QString oldScales = mySettings.value( QStringLiteral( "Map/scales" ), PROJECT_SCALES ).toString();
91209120

9121-
bool oldCapitalise = mySettings.value( QStringLiteral( "/qgis/capitaliseLayerName" ), QVariant( false ) ).toBool();
9121+
bool oldCapitalize = mySettings.value( QStringLiteral( "/qgis/capitalizeLayerName" ), QVariant( false ) ).toBool();
91229122

91239123
QgsOptions *optionsDialog = new QgsOptions( parent );
91249124
if ( !currentPage.isEmpty() )
@@ -9143,7 +9143,7 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
91439143

91449144
mMapCanvas->setMapUpdateInterval( mySettings.value( QStringLiteral( "/qgis/map_update_interval" ), 250 ).toInt() );
91459145

9146-
if ( oldCapitalise != mySettings.value( QStringLiteral( "/qgis/capitaliseLayerName" ), QVariant( false ) ).toBool() )
9146+
if ( oldCapitalize != mySettings.value( QStringLiteral( "/qgis/capitalizeLayerName" ), QVariant( false ) ).toBool() )
91479147
{
91489148
// if the layer capitalization has changed, we need to update all layer names
91499149
Q_FOREACH ( QgsMapLayer* layer, QgsProject::instance()->mapLayers() )

src/app/qgsoptions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl )
693693
pbnMeasureColor->setContext( QStringLiteral( "gui" ) );
694694
pbnMeasureColor->setDefaultColor( QColor( 222, 155, 67 ) );
695695

696-
capitaliseCheckBox->setChecked( mSettings->value( QStringLiteral( "/qgis/capitaliseLayerName" ), QVariant( false ) ).toBool() );
696+
capitalizeCheckBox->setChecked( mSettings->value( QStringLiteral( "/qgis/capitalizeLayerName" ), QVariant( false ) ).toBool() );
697697

698698
int projOpen = mSettings->value( QStringLiteral( "/qgis/projOpenAtLaunch" ), 0 ).toInt();
699699
mProjectOnLaunchCmbBx->setCurrentIndex( projOpen );
@@ -1185,8 +1185,8 @@ void QgsOptions::saveOptions()
11851185

11861186
mSettings->setValue( QStringLiteral( "/qgis/map_update_interval" ), spinMapUpdateInterval->value() );
11871187
mSettings->setValue( QStringLiteral( "/qgis/legendDoubleClickAction" ), cmbLegendDoubleClickAction->currentIndex() );
1188-
bool legendLayersCapitalise = mSettings->value( QStringLiteral( "/qgis/capitaliseLayerName" ), false ).toBool();
1189-
mSettings->setValue( QStringLiteral( "/qgis/capitaliseLayerName" ), capitaliseCheckBox->isChecked() );
1188+
bool legendLayersCapitalize = mSettings->value( QStringLiteral( "/qgis/capitalizeLayerName" ), false ).toBool();
1189+
mSettings->setValue( QStringLiteral( "/qgis/capitalizeLayerName" ), capitalizeCheckBox->isChecked() );
11901190

11911191
// Default simplify drawing configuration
11921192
QgsVectorSimplifyMethod::SimplifyHints simplifyHints = QgsVectorSimplifyMethod::NoSimplification;
@@ -1440,7 +1440,7 @@ void QgsOptions::saveOptions()
14401440
// refresh legend if any legend item's state is to be changed
14411441
if ( legendLayersBold != mLegendLayersBoldChkBx->isChecked()
14421442
|| legendGroupsBold != mLegendGroupsBoldChkBx->isChecked()
1443-
|| legendLayersCapitalise != capitaliseCheckBox->isChecked() )
1443+
|| legendLayersCapitalize != capitalizeCheckBox->isChecked() )
14441444
{
14451445
// TODO[MD] QgisApp::instance()->legend()->updateLegendItemStyles();
14461446
}

src/app/qgsrasterlayerproperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ void QgsRasterLayerProperties::apply()
10071007

10081008
void QgsRasterLayerProperties::on_mLayerOrigNameLineEd_textEdited( const QString& text )
10091009
{
1010-
leDisplayName->setText( mRasterLayer->capitaliseLayerName( text ) );
1010+
leDisplayName->setText( mRasterLayer->capitalizeLayerName( text ) );
10111011
}
10121012

10131013
void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()

src/app/qgsvectorlayerproperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ QString QgsVectorLayerProperties::metadata()
693693

694694
void QgsVectorLayerProperties::on_mLayerOrigNameLineEdit_textEdited( const QString& text )
695695
{
696-
txtDisplayName->setText( mLayer->capitaliseLayerName( text ) );
696+
txtDisplayName->setText( mLayer->capitalizeLayerName( text ) );
697697
}
698698

699699
void QgsVectorLayerProperties::on_mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem& crs )

src/core/qgsmaplayer.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ QgsMapLayer::QgsMapLayer( QgsMapLayer::LayerType type,
6363
, mStyleManager( new QgsMapLayerStyleManager( this ) )
6464
{
6565
// Set the display name = internal name
66-
mLayerName = capitaliseLayerName( mLayerOrigName );
66+
mLayerName = capitalizeLayerName( mLayerOrigName );
6767

6868
mShortName = QLatin1String( "" );
6969
//mShortName.replace( QRegExp( "[\\W]" ), "_" );
@@ -106,7 +106,7 @@ QString QgsMapLayer::id() const
106106

107107
void QgsMapLayer::setName( const QString& name )
108108
{
109-
QString newName = capitaliseLayerName( name );
109+
QString newName = capitalizeLayerName( name );
110110
if ( name == mLayerOrigName && newName == mLayerName )
111111
return;
112112

@@ -994,16 +994,16 @@ void QgsMapLayer::setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSign
994994
emit crsChanged();
995995
}
996996

997-
QString QgsMapLayer::capitaliseLayerName( const QString& name )
997+
QString QgsMapLayer::capitalizeLayerName( const QString& name )
998998
{
999-
// Capitalise the first letter of the layer name if requested
999+
// Capitalize the first letter of the layer name if requested
10001000
QSettings settings;
1001-
bool capitaliseLayerName =
1002-
settings.value( QStringLiteral( "/qgis/capitaliseLayerName" ), QVariant( false ) ).toBool();
1001+
bool capitalizeLayerName =
1002+
settings.value( QStringLiteral( "/qgis/capitalizeLayerName" ), QVariant( false ) ).toBool();
10031003

10041004
QString layerName( name );
10051005

1006-
if ( capitaliseLayerName && !layerName.isEmpty() )
1006+
if ( capitalizeLayerName && !layerName.isEmpty() )
10071007
layerName = layerName.at( 0 ).toUpper() + layerName.mid( 1 );
10081008

10091009
return layerName;

src/core/qgsmaplayer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ class CORE_EXPORT QgsMapLayer : public QObject
419419
//! Sets layer's spatial reference system
420420
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );
421421

422-
//! A convenience function to (un)capitalise the layer name
423-
static QString capitaliseLayerName( const QString& name );
422+
//! A convenience function to (un)capitalize the layer name
423+
static QString capitalizeLayerName( const QString& name );
424424

425425
/** Retrieve the style URI for this layer
426426
* (either as a .qml file on disk or as a

src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ void QgsVectorLayer::setDataSource( const QString& dataSource, const QString& ba
15121512
QgsWkbTypes::GeometryType geomType = mValid && mDataProvider ? geometryType() : QgsWkbTypes::UnknownGeometry;
15131513

15141514
mDataSource = dataSource;
1515-
mLayerName = capitaliseLayerName( baseName );
1515+
mLayerName = capitalizeLayerName( baseName );
15161516
setName( mLayerName );
15171517
setDataProvider( provider );
15181518

src/ui/qgsoptionsbase.ui

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,15 +2902,15 @@
29022902
</spacer>
29032903
</item>
29042904
<item row="1" column="1">
2905-
<widget class="QCheckBox" name="capitaliseCheckBox">
2905+
<widget class="QCheckBox" name="capitalizeCheckBox">
29062906
<property name="sizePolicy">
29072907
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
29082908
<horstretch>0</horstretch>
29092909
<verstretch>0</verstretch>
29102910
</sizepolicy>
29112911
</property>
29122912
<property name="text">
2913-
<string>Capitalise layer names</string>
2913+
<string>Capitalize layer names</string>
29142914
</property>
29152915
</widget>
29162916
</item>
@@ -5457,7 +5457,7 @@
54575457
<tabstop>pbnSelectionColor</tabstop>
54585458
<tabstop>pbnCanvasColor</tabstop>
54595459
<tabstop>cmbLegendDoubleClickAction</tabstop>
5460-
<tabstop>capitaliseCheckBox</tabstop>
5460+
<tabstop>capitalizeCheckBox</tabstop>
54615461
<tabstop>mLegendLayersBoldChkBx</tabstop>
54625462
<tabstop>mLegendGroupsBoldChkBx</tabstop>
54635463
<tabstop>cbxLegendClassifiers</tabstop>

0 commit comments

Comments
 (0)