Skip to content
Permalink
Browse files

Indentation

  • Loading branch information
nyalldawson committed Mar 20, 2021
1 parent 44936ef commit 2a9d2b02b1aed46b3e09f756ca208451c7a9746e
Showing with 10 additions and 10 deletions.
  1. +10 −10 src/server/services/landingpage/qgslandingpageutils.cpp
@@ -305,8 +305,8 @@ json QgsLandingPageUtils::projectInfo( const QString &projectUri, const QgsServe
info["description"] = description.toStdString();
// CRS
const QStringList wmsOutputCrsList { QgsServerProjectUtils::wmsOutputCrsList( *p ) };
const QString crs { wmsOutputCrsList.contains( QStringLiteral( "EPSG:4326" ) ) || wmsOutputCrsList.isEmpty() ?
QStringLiteral( "EPSG:4326" ) : wmsOutputCrsList.first() };
const QString crs = wmsOutputCrsList.contains( QStringLiteral( "EPSG:4326" ) ) || wmsOutputCrsList.isEmpty() ?
QStringLiteral( "EPSG:4326" ) : wmsOutputCrsList.first();
info["crs"] = crs.toStdString();
// Typenames for WMS
const bool useIds { QgsServerProjectUtils::wmsUseLayerIds( *p ) };
@@ -473,14 +473,14 @@ json QgsLandingPageUtils::projectInfo( const QString &projectUri, const QgsServe
continue;
}
const QgsFieldConstraints::Constraints constraints { field.constraints().constraints() };
const bool notNull { constraints &QgsFieldConstraints::Constraint::ConstraintNotNull &&
field.constraints().constraintStrength( QgsFieldConstraints::Constraint::ConstraintNotNull ) == QgsFieldConstraints::ConstraintStrength::ConstraintStrengthHard };
const bool unique { constraints &QgsFieldConstraints::Constraint::ConstraintUnique &&
field.constraints().constraintStrength( QgsFieldConstraints::Constraint::ConstraintUnique ) == QgsFieldConstraints::ConstraintStrength::ConstraintStrengthHard };
const bool hasExpression { constraints &QgsFieldConstraints::Constraint::ConstraintExpression &&
field.constraints().constraintStrength( QgsFieldConstraints::Constraint::ConstraintExpression ) == QgsFieldConstraints::ConstraintStrength::ConstraintStrengthHard };
const QString &defaultValue { vl->dataProvider()->defaultValueClause( fieldIdx ) };
const bool isReadOnly( notNull && unique && ! defaultValue.isEmpty() );
const bool notNull = constraints & QgsFieldConstraints::Constraint::ConstraintNotNull &&
field.constraints().constraintStrength( QgsFieldConstraints::Constraint::ConstraintNotNull ) == QgsFieldConstraints::ConstraintStrength::ConstraintStrengthHard;
const bool unique = constraints & QgsFieldConstraints::Constraint::ConstraintUnique &&
field.constraints().constraintStrength( QgsFieldConstraints::Constraint::ConstraintUnique ) == QgsFieldConstraints::ConstraintStrength::ConstraintStrengthHard;
const bool hasExpression = constraints & QgsFieldConstraints::Constraint::ConstraintExpression &&
field.constraints().constraintStrength( QgsFieldConstraints::Constraint::ConstraintExpression ) == QgsFieldConstraints::ConstraintStrength::ConstraintStrengthHard;
const QString defaultValue = vl->dataProvider()->defaultValueClause( fieldIdx );
const bool isReadOnly = notNull && unique && ! defaultValue.isEmpty();
fieldsData[ field.name().toStdString() ] =
{
{ "type", field.typeName().toStdString() },

0 comments on commit 2a9d2b0

Please sign in to comment.