From 2897024aca21bbcc91a31f8487da4270e40db2e3 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 12 Nov 2024 09:05:06 +1000 Subject: [PATCH] QString fixup --- src/auth/oauth2/core/qgso2.cpp | 6 +- src/core/qgsdiagramrenderer.cpp | 6 +- src/core/stac/qgsstaccatalog.cpp | 26 ++++---- src/core/stac/qgsstaccollection.cpp | 64 +++++++++---------- src/core/stac/qgsstacdataitems.cpp | 4 +- src/core/stac/qgsstacitem.cpp | 44 ++++++------- .../vectortile/qgsmapboxglstyleconverter.cpp | 2 +- .../qgsexpressionaddfunctionfiledialog.cpp | 6 +- src/gui/qgsexpressionbuilderwidget.cpp | 12 ++-- src/server/services/wms/qgswmsrenderer.cpp | 2 +- 10 files changed, 86 insertions(+), 86 deletions(-) diff --git a/src/auth/oauth2/core/qgso2.cpp b/src/auth/oauth2/core/qgso2.cpp index 0cb8384ef0fd..0d610d072318 100644 --- a/src/auth/oauth2/core/qgso2.cpp +++ b/src/auth/oauth2/core/qgso2.cpp @@ -141,9 +141,9 @@ void QgsO2::setVerificationResponseContent() if ( verhtml.open( QIODevice::ReadOnly | QIODevice::Text ) ) { setReplyContent( QString::fromUtf8( verhtml.readAll() ) - .replace( QStringLiteral( "{{ H2_TITLE }}" ), tr( "QGIS OAuth2 verification has finished" ) ) - .replace( QStringLiteral( "{{ H3_TITLE }}" ), tr( "If you have not been returned to QGIS, bring the application to the forefront." ) ) - .replace( QStringLiteral( "{{ CLOSE_WINDOW }}" ), tr( "Close window" ) ).toUtf8() + .replace( QLatin1String( "{{ H2_TITLE }}" ), tr( "QGIS OAuth2 verification has finished" ) ) + .replace( QLatin1String( "{{ H3_TITLE }}" ), tr( "If you have not been returned to QGIS, bring the application to the forefront." ) ) + .replace( QLatin1String( "{{ CLOSE_WINDOW }}" ), tr( "Close window" ) ).toUtf8() ); } } diff --git a/src/core/qgsdiagramrenderer.cpp b/src/core/qgsdiagramrenderer.cpp index 4baf93c4b9c5..962fe477df4a 100644 --- a/src/core/qgsdiagramrenderer.cpp +++ b/src/core/qgsdiagramrenderer.cpp @@ -1122,19 +1122,19 @@ void QgsStackedDiagramRenderer::_readXmlSubRenderers( const QDomElement &elem, c { const QDomElement subRendererElem = childRendererList.at( i ).toElement(); - if ( subRendererElem.nodeName() == QStringLiteral( "SingleCategoryDiagramRenderer" ) ) + if ( subRendererElem.nodeName() == QLatin1String( "SingleCategoryDiagramRenderer" ) ) { std::unique_ptr< QgsSingleCategoryDiagramRenderer > singleCatDiagramRenderer = std::make_unique< QgsSingleCategoryDiagramRenderer >(); singleCatDiagramRenderer->readXml( subRendererElem, context ); addRenderer( singleCatDiagramRenderer.release() ); } - else if ( subRendererElem.nodeName() == QStringLiteral( "LinearlyInterpolatedDiagramRenderer" ) ) + else if ( subRendererElem.nodeName() == QLatin1String( "LinearlyInterpolatedDiagramRenderer" ) ) { std::unique_ptr< QgsLinearlyInterpolatedDiagramRenderer > linearDiagramRenderer = std::make_unique< QgsLinearlyInterpolatedDiagramRenderer >(); linearDiagramRenderer->readXml( subRendererElem, context ); addRenderer( linearDiagramRenderer.release() ); } - else if ( subRendererElem.nodeName() == QStringLiteral( "StackedDiagramRenderer" ) ) + else if ( subRendererElem.nodeName() == QLatin1String( "StackedDiagramRenderer" ) ) { std::unique_ptr< QgsStackedDiagramRenderer > stackedDiagramRenderer = std::make_unique< QgsStackedDiagramRenderer >(); stackedDiagramRenderer->readXml( subRendererElem, context ); diff --git a/src/core/stac/qgsstaccatalog.cpp b/src/core/stac/qgsstaccatalog.cpp index 58ed28e8d438..32e3ad606bb4 100644 --- a/src/core/stac/qgsstaccatalog.cpp +++ b/src/core/stac/qgsstaccatalog.cpp @@ -33,48 +33,48 @@ QString QgsStacCatalog::toHtml() const { QString html = QStringLiteral( "\n\n" ); - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Catalog" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Catalog") ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "id" ), id() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "stac_version" ), stacVersion() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "title" ), title() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "description" ), description() ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2
\n" ); + html += QLatin1String( "\n" ); if ( !mStacExtensions.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Extensions" ) ); - html += QStringLiteral( "\n" ); } if ( ! mConformanceClasses.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Conformance Classes" ) ); - html += QStringLiteral( "\n" ); } - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Links" ) ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Links") ); for ( const QgsStacLink &link : mLinks ) { - html += QStringLiteral( "\n" ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "relation" ), link.relation() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "title" ), link.title() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "url" ), link.href() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "type" ), link.mediaType() ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); } - html += QStringLiteral( "\n\n\n" ); + html += QLatin1String( "\n\n\n" ); return html; } diff --git a/src/core/stac/qgsstaccollection.cpp b/src/core/stac/qgsstaccollection.cpp index c8af651c109b..575a557ff61e 100644 --- a/src/core/stac/qgsstaccollection.cpp +++ b/src/core/stac/qgsstaccollection.cpp @@ -38,8 +38,8 @@ QString QgsStacCollection::toHtml() const { QString html = QStringLiteral( "\n\n" ); - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Collection" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Collection") ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "id" ), id() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "stac_version" ), stacVersion() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "title" ), title() ); @@ -48,48 +48,48 @@ QString QgsStacCollection::toHtml() const html += QStringLiteral( "\n" ).arg( QStringLiteral( "description" ), descr.toHtml() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "license" ), license() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "keywords" ), keywords().join( ',' ) ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2
%1%2
%1%2
\n" ); + html += QLatin1String( "\n" ); if ( !mStacExtensions.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Extensions" ) ); - html += QStringLiteral( "\n" ); } if ( ! mConformanceClasses.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Conformance Classes" ) ); - html += QStringLiteral( "\n" ); } if ( ! mProviders.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Providers" ) ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Providers") ); QTextDocument descr; for ( const QgsStacProvider &p : mProviders ) { - html += QStringLiteral( "\n" ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "name" ), p.name() ); descr.setMarkdown( p.description() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "description" ), descr.toHtml() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "roles" ), p.roles().join( ',' ) ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "url" ), p.url() ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); } } - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Spatial Extent" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Spatial Extent") ); + html += QLatin1String( "
\n" ); QString extentString; if ( mExtent.spatialExtent().is3D() ) extentString = mExtent.spatialExtent().toString(); @@ -111,58 +111,58 @@ QString QgsStacCollection::toHtml() const html += QStringLiteral( "\n" ).arg( QStringLiteral( "detailed" ), extentString ); } } - html += QStringLiteral( "
%1%2

\n" ); + html += QLatin1String( "
\n" ); - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Temporal Extent" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Temporal Extent") ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "start" ), mExtent.temporalExtent().begin().toString() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "end" ), mExtent.temporalExtent().end().toString() ); - html += QStringLiteral( "
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); if ( mExtent.hasDetailedTemporalExtents() ) { - html += QStringLiteral( "Detailed extents:\n" ); + html += QLatin1String( "Detailed extents:\n" ); const QVector< QgsDateTimeRange > extents = mExtent.detailedTemporalExtents(); for ( const QgsDateTimeRange &extent : extents ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Temporal Extent" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Temporal Extent") ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "start" ), extent.begin().toString() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "end" ), extent.end().toString() ); - html += QStringLiteral( "
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); } } if ( ! mSummaries.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Summaries" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Summaries") ); + html += QLatin1String( "
\n" ); for ( auto it = mSummaries.constBegin(); it != mSummaries.constEnd(); ++it ) { html += QStringLiteral( "\n" ).arg( it.key(), it.value().toString() ); } - html += QStringLiteral( "
%1%2

\n" ); + html += QLatin1String( "
\n" ); } - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Links" ) ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Links") ); for ( const QgsStacLink &link : mLinks ) { - html += QStringLiteral( "\n" ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "relation" ), link.relation() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "title" ), link.title() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "url" ), link.href() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "type" ), link.mediaType() ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); } if ( ! mAssets.isEmpty() ) { QTextDocument descr; - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Assets" ) ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Assets") ); for ( auto it = mAssets.constBegin(); it != mAssets.constEnd(); ++it ) { - html += QStringLiteral( "\n" ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "id" ), it.key() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "title" ), it->title() ); descr.setMarkdown( it->description() ); @@ -170,11 +170,11 @@ QString QgsStacCollection::toHtml() const html += QStringLiteral( "\n" ).arg( QStringLiteral( "url" ), it->href() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "type" ), it->mediaType() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "roles" ), it->roles().join( ',' ) ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); } } - html += QStringLiteral( "\n\n\n" ); + html += QLatin1String( "\n\n\n" ); return html; } diff --git a/src/core/stac/qgsstacdataitems.cpp b/src/core/stac/qgsstacdataitems.cpp index e5b197e04ce3..b5495b9861cb 100644 --- a/src/core/stac/qgsstacdataitems.cpp +++ b/src/core/stac/qgsstacdataitems.cpp @@ -90,7 +90,7 @@ bool QgsStacItemItem::hasDragEnabled() const if ( it->mediaType() == QLatin1String( "image/tiff; application=geotiff; profile=cloud-optimized" ) || it->mediaType() == QLatin1String( "image/vnd.stac.geotiff; cloud-optimized=true" ) || it->mediaType() == QLatin1String( "application/vnd.laszip+copc" ) || - it->href().endsWith( QStringLiteral( "/ept.json" ) ) ) + it->href().endsWith( QLatin1String( "/ept.json" ) ) ) return true; } return false; @@ -137,7 +137,7 @@ QgsMimeDataUtils::UriList QgsStacItemItem::mimeUris() const uri.providerKey = QStringLiteral( "copc" ); uri.uri = it->href(); } - else if ( it->href().endsWith( QStringLiteral( "/ept.json" ) ) ) + else if ( it->href().endsWith( QLatin1String( "/ept.json" ) ) ) { uri.layerType = QStringLiteral( "pointcloud" ); uri.providerKey = QStringLiteral( "ept" ); diff --git a/src/core/stac/qgsstacitem.cpp b/src/core/stac/qgsstacitem.cpp index 84e16aae8668..0b1e31291550 100644 --- a/src/core/stac/qgsstacitem.cpp +++ b/src/core/stac/qgsstacitem.cpp @@ -40,73 +40,73 @@ QString QgsStacItem::toHtml() const { QString html = QStringLiteral( "\n\n" ); - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Item" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Item") ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "id" ), id() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "stac_version" ), stacVersion() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "collection" ), collection() ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
\n" ); + html += QLatin1String( "\n" ); if ( !mStacExtensions.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Extensions" ) ); - html += QStringLiteral( "\n" ); } - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Geometry" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Geometry") ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "WKT" ), mGeometry.asWkt() ); - html += QStringLiteral( "
%1%2
\n" ); + html += QLatin1String( "\n" ); - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Bounding Box" ) ); - html += QStringLiteral( "\n" ); if ( ! mProperties.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Properties" ) ); - html += QStringLiteral( "\n" ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Properties") ); + html += QLatin1String( "
\n" ); for ( auto it = mProperties.constBegin(); it != mProperties.constEnd(); ++it ) { html += QStringLiteral( "\n" ).arg( it.key(), it.value().toString() ); } - html += QStringLiteral( "
%1%2

\n" ); + html += QLatin1String( "
\n" ); } - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Links" ) ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Links") ); for ( const QgsStacLink &link : mLinks ) { - html += QStringLiteral( "\n" ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "relation" ), link.relation() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "title" ), link.title() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "url" ), link.href() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "type" ), link.mediaType() ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); } if ( ! mAssets.isEmpty() ) { - html += QStringLiteral( "

%1

\n
\n" ).arg( QStringLiteral( "Assets" ) ); + html += QStringLiteral( "

%1

\n
\n" ).arg( QLatin1String( "Assets") ); for ( auto it = mAssets.constBegin(); it != mAssets.constEnd(); ++it ) { - html += QStringLiteral( "\n" ); + html += QLatin1String( "
\n" ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "id" ), it.key() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "title" ), it->title() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "description" ), it->description() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "url" ), it->href() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "type" ), it->mediaType() ); html += QStringLiteral( "\n" ).arg( QStringLiteral( "roles" ), it->roles().join( ',' ) ); - html += QStringLiteral( "
%1%2
%1%2
%1%2
%1%2
%1%2
%1%2

\n" ); + html += QLatin1String( "
\n" ); } } - html += QStringLiteral( "\n\n\n" ); + html += QLatin1String( "\n\n\n" ); return html; } diff --git a/src/core/vectortile/qgsmapboxglstyleconverter.cpp b/src/core/vectortile/qgsmapboxglstyleconverter.cpp index ecfa0bd97103..2f269e1907f2 100644 --- a/src/core/vectortile/qgsmapboxglstyleconverter.cpp +++ b/src/core/vectortile/qgsmapboxglstyleconverter.cpp @@ -3337,7 +3337,7 @@ QString QgsMapBoxGlStyleConverter::parseExpression( const QVariantList &expressi QVariantList values = expression.mid( 2 ); if ( expression.size() == 3 && expression.at( 2 ).userType() == QMetaType::Type::QVariantList && expression.at( 2 ).toList().count() > 1 - && expression.at( 2 ).toList().at( 0 ).toString() == QStringLiteral( "literal" ) ) + && expression.at( 2 ).toList().at( 0 ).toString() == QLatin1String( "literal" ) ) { values = expression.at( 2 ).toList().at( 1 ).toList(); } diff --git a/src/gui/qgsexpressionaddfunctionfiledialog.cpp b/src/gui/qgsexpressionaddfunctionfiledialog.cpp index 1e88462e9561..07949478df81 100644 --- a/src/gui/qgsexpressionaddfunctionfiledialog.cpp +++ b/src/gui/qgsexpressionaddfunctionfiledialog.cpp @@ -41,7 +41,7 @@ QgsExpressionAddFunctionFileDialog::QgsExpressionAddFunctionFileDialog( bool ena void QgsExpressionAddFunctionFileDialog::cboFileOptions_currentIndexChanged( int ) { - bool projectSelected = cboFileOptions->currentData() == QStringLiteral( "project" ); + bool projectSelected = cboFileOptions->currentData() == QLatin1String( "project" ); lblNewFileName->setVisible( !projectSelected ); txtNewFileName->setVisible( !projectSelected ); updateOkButtonStatus(); @@ -52,7 +52,7 @@ void QgsExpressionAddFunctionFileDialog::updateOkButtonStatus() QPushButton *okBtn = buttonBox->button( QDialogButtonBox::StandardButton::Ok ); okBtn->setEnabled( true ); - if ( cboFileOptions->currentData() != QStringLiteral( "project" ) ) + if ( cboFileOptions->currentData() != QLatin1String( "project" ) ) { okBtn->setEnabled( !txtNewFileName->text().trimmed().isEmpty() ); } @@ -60,7 +60,7 @@ void QgsExpressionAddFunctionFileDialog::updateOkButtonStatus() bool QgsExpressionAddFunctionFileDialog::createProjectFunctions() const { - return cboFileOptions->currentData() == QStringLiteral( "project" ); + return cboFileOptions->currentData() == QLatin1String( "project" ); } QString QgsExpressionAddFunctionFileDialog::fileName() diff --git a/src/gui/qgsexpressionbuilderwidget.cpp b/src/gui/qgsexpressionbuilderwidget.cpp index 4a2dc1391bc7..cc2364e27994 100644 --- a/src/gui/qgsexpressionbuilderwidget.cpp +++ b/src/gui/qgsexpressionbuilderwidget.cpp @@ -340,7 +340,7 @@ void QgsExpressionBuilderWidget::btnRun_pressed() if ( !cmbFileNames->currentItem() ) return; - if ( cmbFileNames->currentItem()->data( Qt::UserRole ) == QStringLiteral( "project" ) ) + if ( cmbFileNames->currentItem()->data( Qt::UserRole ) == QLatin1String( "project" ) ) { saveProjectFunctionsEntry(); } @@ -499,7 +499,7 @@ void QgsExpressionBuilderWidget::btnNewFile_pressed() void QgsExpressionBuilderWidget::btnRemoveFile_pressed() { - if ( cmbFileNames->currentItem()->data( Qt::UserRole ) == QStringLiteral( "project" ) ) + if ( cmbFileNames->currentItem()->data( Qt::UserRole ) == QLatin1String( "project" ) ) { if ( QMessageBox::question( this, tr( "Remove Project Functions" ), tr( "Are you sure you want to remove the project functions?" ), @@ -532,7 +532,7 @@ void QgsExpressionBuilderWidget::btnRemoveFile_pressed() if ( cmbFileNames->count() > 0 ) { whileBlocking( cmbFileNames )->setCurrentRow( currentRow > 0 ? currentRow - 1 : 0 ); - if ( cmbFileNames->currentItem()->data( Qt::UserRole ) == QStringLiteral( "project" ) ) + if ( cmbFileNames->currentItem()->data( Qt::UserRole ) == QLatin1String( "project" ) ) { loadCodeFromProjectFunctions(); } @@ -553,7 +553,7 @@ void QgsExpressionBuilderWidget::cmbFileNames_currentItemChanged( QListWidgetIte { if ( lastitem ) { - if ( lastitem->data( Qt::UserRole ) == QStringLiteral( "project" ) ) + if ( lastitem->data( Qt::UserRole ) == QLatin1String( "project" ) ) { saveProjectFunctionsEntry(); } @@ -564,7 +564,7 @@ void QgsExpressionBuilderWidget::cmbFileNames_currentItemChanged( QListWidgetIte } } - if ( item->data( Qt::UserRole ) == QStringLiteral( "project" ) ) + if ( item->data( Qt::UserRole ) == QLatin1String( "project" ) ) { loadCodeFromProjectFunctions(); } @@ -1071,7 +1071,7 @@ void QgsExpressionBuilderWidget::autosave() if ( !item ) return; - if ( item->data( Qt::UserRole ) == QStringLiteral( "project" ) ) + if ( item->data( Qt::UserRole ) == QLatin1String( "project" ) ) { saveProjectFunctionsEntry(); } diff --git a/src/server/services/wms/qgswmsrenderer.cpp b/src/server/services/wms/qgswmsrenderer.cpp index c4c66e4c10c0..73356a17872f 100644 --- a/src/server/services/wms/qgswmsrenderer.cpp +++ b/src/server/services/wms/qgswmsrenderer.cpp @@ -133,7 +133,7 @@ namespace QgsWms for ( const auto &layer : std::as_const( layersToRender ) ) { // If it is a cascading WMS layer, get legend node image size - if ( layer->dataProvider()->name() == QStringLiteral( "wms" ) ) + if ( layer->dataProvider()->name() == QLatin1String( "wms" ) ) { if ( QgsWmsLegendNode *layerNode = qobject_cast( model.findLegendNode( layer->id(), QString() ) ) ) {