mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Set loadDefaultStyle to false when loading layers for fields info only
This commit is contained in:
parent
83a4c7cde3
commit
03e42892b0
@ -275,7 +275,7 @@ QList<QgsAbstractDatabaseProviderConnection::TableProperty::GeometryColumnType>
|
||||
|
||||
QgsFields QgsAbstractDatabaseProviderConnection::fields( const QString &schema, const QString &tableName ) const
|
||||
{
|
||||
QgsVectorLayer::LayerOptions options { true, true };
|
||||
QgsVectorLayer::LayerOptions options { false, true };
|
||||
options.skipCrsValidation = true;
|
||||
QgsVectorLayer vl { tableUri( schema, tableName ), QStringLiteral( "temp_layer" ), mProviderKey, options };
|
||||
if ( vl.isValid() )
|
||||
|
@ -685,7 +685,7 @@ QgsFields QgsPostgresProviderConnection::fields( const QString &schema, const QS
|
||||
tUri.setKeyColumn( tableInfo.primaryKeyColumns().first() );
|
||||
}
|
||||
tUri.setParam( QStringLiteral( "checkPrimaryKeyUnicity" ), QLatin1String( "0" ) );
|
||||
QgsVectorLayer::LayerOptions options { true, true };
|
||||
QgsVectorLayer::LayerOptions options { false, true };
|
||||
options.skipCrsValidation = true;
|
||||
QgsVectorLayer vl { tUri.uri(), QStringLiteral( "temp_layer" ), mProviderKey, options };
|
||||
if ( vl.isValid() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user