Skip to content
Permalink
Browse files

fix indentation

  • Loading branch information
suricactus authored and nyalldawson committed Mar 9, 2020
1 parent 4caa254 commit 323a9a46c2f1456141b63e6b86919a0e5f907227
Showing with 16 additions and 16 deletions.
  1. +16 −16 src/gui/qgsexpressionbuilderwidget.cpp
@@ -633,7 +633,7 @@ void QgsExpressionBuilderWidget::loadRecent( const QString &collection )
int i = 0;
for ( const QString &expression : expressions )
{
QString help = formatRecentExpressionHelp(expression, expression);
QString help = formatRecentExpressionHelp( expression, expression );
registerItem( name, expression, expression, help, QgsExpressionItem::ExpressionNode, false, i );
i++;
}
@@ -940,63 +940,63 @@ void QgsExpressionBuilderWidget::registerItemForAllGroups( const QStringList &gr
QString QgsExpressionBuilderWidget::formatRelationHelp( const QgsRelation &relation ) const
{
QString text = QStringLiteral( "<h3>%1</h3>\n<div class=\"description\"><p>%2</p></div>" )
.arg( QCoreApplication::translate( "relation_help", "relation %1" ).arg( relation.name() ),
tr( "Inserts the relation ID for the relation named '%1'." ).arg( relation.name() ) );
.arg( QCoreApplication::translate( "relation_help", "relation %1" ).arg( relation.name() ),
tr( "Inserts the relation ID for the relation named '%1'." ).arg( relation.name() ) );

text += QStringLiteral( "<h4>%1</h4><div class=\"description\"><pre>%2</pre></div>" )
.arg( tr( "Current value" ), relation.id() );
.arg( tr( "Current value" ), relation.id() );

return text;
}

QString QgsExpressionBuilderWidget::formatLayerHelp( const QgsMapLayer *layer ) const
{
QString text = QStringLiteral( "<h3>%1</h3>\n<div class=\"description\"><p>%2</p></div>" )
.arg( QCoreApplication::translate( "layer_help", "map layer %1" ).arg( layer->name() ),
tr( "Inserts the layer ID for the layer named '%1'." ).arg( layer->name() ) );
.arg( QCoreApplication::translate( "layer_help", "map layer %1" ).arg( layer->name() ),
tr( "Inserts the layer ID for the layer named '%1'." ).arg( layer->name() ) );

text += QStringLiteral( "<h4>%1</h4><div class=\"description\"><pre>%2</pre></div>" )
.arg( tr( "Current value" ), layer->id() );
.arg( tr( "Current value" ), layer->id() );

return text;
}

QString QgsExpressionBuilderWidget::formatRecentExpressionHelp( const QString &label, const QString &expression ) const
{
QString text = QStringLiteral( "<h3>%1</h3>\n<div class=\"description\"><p>%2</p></div>" )
.arg( QCoreApplication::translate( "recent_expression_help", "expression %1" ).arg( label),
QCoreApplication::translate( "recent_expression_help", "Recently used expression." ) );
.arg( QCoreApplication::translate( "recent_expression_help", "expression %1" ).arg( label ),
QCoreApplication::translate( "recent_expression_help", "Recently used expression." ) );

text += QStringLiteral( "<h4>%1</h4><div class=\"description\"><pre>%2</pre></div>" )
.arg( tr( "Expression" ), expression );
.arg( tr( "Expression" ), expression );

return text;
}

QString QgsExpressionBuilderWidget::formatUserExpressionHelp( const QString &label, const QString &expression, const QString &description ) const
{
QString text = QStringLiteral( "<h3>%1</h3>\n<div class=\"description\"><p>%2</p></div>" )
.arg( QCoreApplication::translate( "user_expression_help", "expression %1" ).arg( label ), description );
.arg( QCoreApplication::translate( "user_expression_help", "expression %1" ).arg( label ), description );

text += QStringLiteral( "<h4>%1</h4><div class=\"description\"><pre>%2</pre></div>" )
.arg( tr( "Expression" ), expression );
.arg( tr( "Expression" ), expression );

return text;
}

QString QgsExpressionBuilderWidget::formatVariableHelp( const QString &variable, const QString &description, bool showValue, const QVariant &value ) const
{
QString text = QStringLiteral( "<h3>%1</h3>\n<div class=\"description\"><p>%2</p></div>" )
.arg( QCoreApplication::translate( "variable_help", "variable %1" ).arg( variable ), description );
.arg( QCoreApplication::translate( "variable_help", "variable %1" ).arg( variable ), description );

if ( showValue )
{
QString valueString = !value.isValid()
? QCoreApplication::translate( "variable_help", "not set" )
: QStringLiteral( "<pre>%1</pre>" ).arg( QgsExpression::formatPreviewString( value ) );
? QCoreApplication::translate( "variable_help", "not set" )
: QStringLiteral( "<pre>%1</pre>" ).arg( QgsExpression::formatPreviewString( value ) );

text += QStringLiteral( "<h4>%1</h4><div class=\"description\"><p>%2</p></div>" )
.arg( tr( "Current value" ), valueString);
.arg( tr( "Current value" ), valueString );
}

return text;

0 comments on commit 323a9a4

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