Skip to content
Permalink
Browse files

using camel case for all provider uri params

  • Loading branch information
Samweli committed Apr 29, 2020
1 parent 9fdf50f commit b8fee83f6b0c58afac417ae1436602035389e203
@@ -1279,13 +1279,13 @@ void QgsRasterLayerProperties::updateSourceStaticTime()

if ( mReferenceTime->isChecked() )
{
QString reference_time = mReferenceDateTimeEdit->dateTime().toString( Qt::ISODateWithMs );
uri[ QStringLiteral( "reference_time" ) ] = reference_time;
QString referenceTime = mReferenceDateTimeEdit->dateTime().toString( Qt::ISODateWithMs );
uri[ QStringLiteral( "referenceTime" ) ] = referenceTime;
}
else
{
if ( uri.contains( QStringLiteral( "reference_time" ) ) )
uri.remove( QStringLiteral( "reference_time" ) );
if ( uri.contains( QStringLiteral( "referenceTime" ) ) )
uri.remove( QStringLiteral( "referenceTime" ) );
}
bool enableTime = !mDisableTime->isChecked();

@@ -1347,7 +1347,7 @@ void QgsRasterLayerProperties::setSourceStaticTimeState()
tr( "There is no reference time in the layer's capabilities." ) : QString();
mReferenceTimeLabel->setText( referenceTimeLabelText );

const QString referenceTime = uri.value( QStringLiteral( "reference_time" ) ).toString();
const QString referenceTime = uri.value( QStringLiteral( "referenceTime" ) ).toString();

mReferenceTime->setChecked( !referenceTime.isEmpty() );

@@ -61,7 +61,7 @@ class QgsWMSItemBase
* - "timeDimensionExtent": the layer's time dimension extent it is available
* - "referencetimeDimensionExtent": reference time extent for the bi-temporal dimension layers
* - "time": time value of the current layer data from the provider
* - "reference_time": reference time value of the current of the layer data, this is applicable for the
* - "referenceTime": reference time value of the current of the layer data, this is applicable for the
* bi-temporal dimension layers
* - "allowTemporalUpdates": whether to allow updates on temporal parameters on this uri
* - "temporalSource": the source of the layer's temporal range, can be either "provider" or "project"
@@ -1157,10 +1157,10 @@ void QgsWmsProvider::addWmstParameters( QUrlQuery &query )
}

// If the data provider has bi-temporal properties and they are enabled
if ( uri.contains( QStringLiteral( "reference_time" ) ) &&
!uri.value( QStringLiteral( "reference_time" ) ).toString().isEmpty() )
if ( uri.contains( QStringLiteral( "referenceTime" ) ) &&
!uri.value( QStringLiteral( "referenceTime" ) ).toString().isEmpty() )
{
QString time = uri.value( QStringLiteral( "reference_time" ) ).toString();
QString time = uri.value( QStringLiteral( "referenceTime" ) ).toString();

QDateTime dateTime = QDateTime::fromString( time, Qt::ISODateWithMs );

@@ -1053,7 +1053,6 @@ void QgsWMSSourceSelect::collectDimensions( QStringList &layers, QgsDataSourceUr
if ( uri.param( QLatin1String( "type" ) ) == QLatin1String( "wmst" ) )
{
uri.setParam( QLatin1String( "temporalSource" ), QLatin1String( "provider" ) );
uri.setParam( QLatin1String( "enableTime" ), QLatin1String( "yes" ) );
}

}

0 comments on commit b8fee83

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