Skip to content
Permalink
Browse files

Avoid some detachments

  • Loading branch information
nyalldawson committed May 10, 2016
1 parent 73733a6 commit dd4e32662f0b978611e61cccc0909876e72cec9b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresdataitems.cpp
@@ -449,9 +449,9 @@ QString QgsPGLayerItem::createUri()

QgsDataSourceURI uri( QgsPostgresConn::connUri( connItem->name() ).connectionInfo( false ) );
uri.setDataSource( mLayerProperty.schemaName, mLayerProperty.tableName, mLayerProperty.geometryColName, mLayerProperty.sql, pkColName );
uri.setWkbType( QGis::fromOldWkbType( mLayerProperty.types[0] ) );
uri.setWkbType( QGis::fromOldWkbType( mLayerProperty.types.at( 0 ) ) );
if ( uri.newWkbType() != QgsWKBTypes::NoGeometry )
uri.setSrid( QString::number( mLayerProperty.srids[0] ) );
uri.setSrid( QString::number( mLayerProperty.srids.at( 0 ) ) );
QgsDebugMsg( QString( "layer uri: %1" ).arg( uri.uri( false ) ) );
return uri.uri( false );
}

0 comments on commit dd4e326

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