Skip to content

Commit

Permalink
Replace em dash with QChar unicode literal in QStringLiteral
Browse files Browse the repository at this point in the history
Fixes #37153
  • Loading branch information
elpaso authored and nyalldawson committed Jun 12, 2020
1 parent af4ca5d commit 03e81e8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/mesh/qgsmeshlayerproperties.cpp
Expand Up @@ -113,7 +113,7 @@ QgsMeshLayerProperties::QgsMeshLayerProperties( QgsMapLayer *lyr, QgsMapCanvas *
mOptStackedWidget->indexOf( mOptsPage_Style ) );
}

QString title = QString( tr( "Layer Properties — %1" ) ).arg( lyr->name() );
QString title = tr( "Layer Properties — %1" ).arg( lyr->name() );

if ( !mMeshLayer->styleManager()->isDefault( mMeshLayer->styleManager()->currentStyle() ) )
title += QStringLiteral( " (%1)" ).arg( mMeshLayer->styleManager()->currentStyle() );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/processing/qgsprocessingparameterswidget.cpp
Expand Up @@ -38,7 +38,7 @@ const QgsProcessingAlgorithm *QgsProcessingParametersWidget::algorithm() const

void QgsProcessingParametersWidget::initWidgets()
{
// if there are advanced parameters show corresponding groupbox
// if there are advanced parameters - show corresponding groupbox
const QgsProcessingParameterDefinitions defs = mAlgorithm->parameterDefinitions();
for ( const QgsProcessingParameterDefinition *param : defs )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsexpressionselectiondialog.cpp
Expand Up @@ -42,7 +42,7 @@ QgsExpressionSelectionDialog::QgsExpressionSelectionDialog( QgsVectorLayer *laye
connect( mButtonZoomToFeatures, &QToolButton::clicked, this, &QgsExpressionSelectionDialog::mButtonZoomToFeatures_clicked );
connect( mPbnClose, &QPushButton::clicked, this, &QgsExpressionSelectionDialog::mPbnClose_clicked );

setWindowTitle( QStringLiteral( "%1 — Select by Expression" ).arg( layer->name() ) );
setWindowTitle( tr( "%1 — Select by Expression" ).arg( layer->name() ) );

mActionSelect->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconExpressionSelect.svg" ) ) );
mActionAddToSelection->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconSelectAdd.svg" ) ) );
Expand Down
5 changes: 4 additions & 1 deletion src/gui/qgsoptionsdialogbase.cpp
Expand Up @@ -409,7 +409,10 @@ void QgsOptionsDialogBase::updateWindowTitle()
QListWidgetItem *curitem = mOptListWidget->currentItem();
if ( curitem )
{
setWindowTitle( QStringLiteral( "%1 — %2" ).arg( mDialogTitle, curitem->text() ) );
setWindowTitle( QStringLiteral( "%1 %2 %3" )
.arg( mDialogTitle )
.arg( QChar( 0x2014 ) ) // em-dash unicode
.arg( curitem->text() ) );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/vector/qgsvectorlayerproperties.cpp
Expand Up @@ -374,7 +374,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
mOptStackedWidget->indexOf( mOptsPage_Style ) );
}

QString title = QString( tr( "Layer Properties — %1" ) ).arg( mLayer->name() );
QString title = tr( "Layer Properties — %1" ).arg( mLayer->name() );
if ( !mLayer->styleManager()->isDefault( mLayer->styleManager()->currentStyle() ) )
title += QStringLiteral( " (%1)" ).arg( mLayer->styleManager()->currentStyle() );
restoreOptionsBaseUi( title );
Expand Down

0 comments on commit 03e81e8

Please sign in to comment.