Skip to content
Permalink
Browse files

Replace capitalise by capitalize

  • Loading branch information
DelazJ committed Dec 29, 2016
1 parent 5e87155 commit 7911994097742bb24cf4809c2935fd5d2af8426f
@@ -202,6 +202,7 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>QgsApplication<td>userStyleV2Path<td>userStylePath
<tr><td>QgsComposerShape<td>setUseSymbolV2<td>setUseSymbol
<tr><td>QgsIFeatureSelectionManager<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsMapLayer<td>capitaliseLayerName<td>capitalizeLayerName
<tr><td>QgsSymbolLayerUtils<td>createSymbolLayerV2ListFromSld<td>createSymbolLayerListFromSld
<tr><td>QgsVectorLayer<td>editorWidgetV2Config<td>editorWidgetConfig
<tr><td>QgsVectorLayer<td>editorWidgetV2Text<td>editorWidgetText
@@ -309,7 +310,7 @@ Data Providers {#qgis_api_break_3_0_DataProviders}
Qgis {#qgis_api_break_3_0_Qgis}
----

- The QGis class was renamed to Qgis for capitalisation consistency with other class names
- The QGis class was renamed to Qgis for capitalization consistency with other class names
- permissiveToDouble() and permissiveToInt() where moved out of the QGis class and renamed to qgsPermissiveToDouble() and
qgsPermissiveToInt()
- 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
- drawLabels() method was removed. It used old deprecated labeling. Replaced by labeling based on PAL library, see QgsLabelingEngine.
- readLayerXML() was renamed to readLayerXml()
- writeLayerXML() was renamed to writeLayerXml()
- capitaliseLayerName() was renamed to capitalizeLayerName()


QgsMapLayerRegistry {#qgis_api_break_3_0_QgsMapLayerRegistry}
@@ -395,8 +395,8 @@ class QgsMapLayer : QObject
/** Sets layer's spatial reference system */
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );

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

/** Retrieve the style URI for this layer
* (either as a .qml file on disk or as a
@@ -9118,7 +9118,7 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
QSettings mySettings;
QString oldScales = mySettings.value( QStringLiteral( "Map/scales" ), PROJECT_SCALES ).toString();

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

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

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

if ( oldCapitalise != mySettings.value( QStringLiteral( "/qgis/capitaliseLayerName" ), QVariant( false ) ).toBool() )
if ( oldCapitalize != mySettings.value( QStringLiteral( "/qgis/capitalizeLayerName" ), QVariant( false ) ).toBool() )
{
// if the layer capitalization has changed, we need to update all layer names
Q_FOREACH ( QgsMapLayer* layer, QgsProject::instance()->mapLayers() )
@@ -693,7 +693,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl )
pbnMeasureColor->setContext( QStringLiteral( "gui" ) );
pbnMeasureColor->setDefaultColor( QColor( 222, 155, 67 ) );

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

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

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

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

void QgsRasterLayerProperties::on_mLayerOrigNameLineEd_textEdited( const QString& text )
{
leDisplayName->setText( mRasterLayer->capitaliseLayerName( text ) );
leDisplayName->setText( mRasterLayer->capitalizeLayerName( text ) );
}

void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()
@@ -693,7 +693,7 @@ QString QgsVectorLayerProperties::metadata()

void QgsVectorLayerProperties::on_mLayerOrigNameLineEdit_textEdited( const QString& text )
{
txtDisplayName->setText( mLayer->capitaliseLayerName( text ) );
txtDisplayName->setText( mLayer->capitalizeLayerName( text ) );
}

void QgsVectorLayerProperties::on_mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem& crs )
@@ -63,7 +63,7 @@ QgsMapLayer::QgsMapLayer( QgsMapLayer::LayerType type,
, mStyleManager( new QgsMapLayerStyleManager( this ) )
{
// Set the display name = internal name
mLayerName = capitaliseLayerName( mLayerOrigName );
mLayerName = capitalizeLayerName( mLayerOrigName );

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

void QgsMapLayer::setName( const QString& name )
{
QString newName = capitaliseLayerName( name );
QString newName = capitalizeLayerName( name );
if ( name == mLayerOrigName && newName == mLayerName )
return;

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

QString QgsMapLayer::capitaliseLayerName( const QString& name )
QString QgsMapLayer::capitalizeLayerName( const QString& name )
{
// Capitalise the first letter of the layer name if requested
// Capitalize the first letter of the layer name if requested
QSettings settings;
bool capitaliseLayerName =
settings.value( QStringLiteral( "/qgis/capitaliseLayerName" ), QVariant( false ) ).toBool();
bool capitalizeLayerName =
settings.value( QStringLiteral( "/qgis/capitalizeLayerName" ), QVariant( false ) ).toBool();

QString layerName( name );

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

return layerName;
@@ -419,8 +419,8 @@ class CORE_EXPORT QgsMapLayer : public QObject
//! Sets layer's spatial reference system
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );

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

/** Retrieve the style URI for this layer
* (either as a .qml file on disk or as a
@@ -1512,7 +1512,7 @@ void QgsVectorLayer::setDataSource( const QString& dataSource, const QString& ba
QgsWkbTypes::GeometryType geomType = mValid && mDataProvider ? geometryType() : QgsWkbTypes::UnknownGeometry;

mDataSource = dataSource;
mLayerName = capitaliseLayerName( baseName );
mLayerName = capitalizeLayerName( baseName );
setName( mLayerName );
setDataProvider( provider );

@@ -2902,15 +2902,15 @@
</spacer>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="capitaliseCheckBox">
<widget class="QCheckBox" name="capitalizeCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Capitalise layer names</string>
<string>Capitalize layer names</string>
</property>
</widget>
</item>
@@ -5457,7 +5457,7 @@
<tabstop>pbnSelectionColor</tabstop>
<tabstop>pbnCanvasColor</tabstop>
<tabstop>cmbLegendDoubleClickAction</tabstop>
<tabstop>capitaliseCheckBox</tabstop>
<tabstop>capitalizeCheckBox</tabstop>
<tabstop>mLegendLayersBoldChkBx</tabstop>
<tabstop>mLegendGroupsBoldChkBx</tabstop>
<tabstop>cbxLegendClassifiers</tabstop>

0 comments on commit 7911994

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