mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Do not hard-code database connection parameters
Rely on libpq defaults instead (overridable via environment) Fixes #14308
This commit is contained in:
parent
427e5e9ffd
commit
6365eb7ee6
@ -106,7 +106,7 @@ void TestVectorLayerJoinBuffer::initTestCase()
|
||||
QString dbConn = getenv( "QGIS_PGTEST_DB" );
|
||||
if ( dbConn.isEmpty() )
|
||||
{
|
||||
dbConn = "dbname='qgis_test' host=localhost port=5432 user='postgres' password='postgres'";
|
||||
dbConn = "dbname='qgis_test'";
|
||||
}
|
||||
QgsVectorLayer* vlA_PG = new QgsVectorLayer( QString( "%1 sslmode=disable key='id_a' table=\"qgis_test\".\"table_a\" sql=" ).arg( dbConn ), "A_PG", "postgres" );
|
||||
QgsVectorLayer* vlB_PG = new QgsVectorLayer( QString( "%1 sslmode=disable key='id_b' table=\"qgis_test\".\"table_b\" sql=" ).arg( dbConn ), "B_PG", "postgres" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user