File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,8 @@ QgsDataSourceURI::QgsDataSourceURI( QString uri )
240
240
}
241
241
else
242
242
{
243
- QgsDebugMsg ( " invalid connection option \" " + pname + " \" ignored" );
243
+ QgsDebugMsg ( " parameter \" " + pname + " \" :\" " + pval + " \" added" );
244
+ setParam ( pname, pval );
244
245
}
245
246
}
246
247
}
@@ -590,6 +591,17 @@ QString QgsDataSourceURI::uri() const
590
591
theUri += QString ( " selectatid=false" );
591
592
}
592
593
594
+ for ( QMap<QString, QString>::const_iterator it = mParams .begin (); it != mParams .end (); ++it )
595
+ {
596
+ if ( it.key ().contains ( " =" ) || it.key ().contains ( " " ) )
597
+ {
598
+ QgsDebugMsg ( QString ( " invalid uri parameter %1 skipped" ).arg ( it.key () ) );
599
+ continue ;
600
+ }
601
+
602
+ theUri += " " + it.key () + " ='" + escape ( it.value () ) + " '" ;
603
+ }
604
+
593
605
QString columnName ( mGeometryColumn );
594
606
columnName.replace ( " \\ " , " \\\\ " );
595
607
columnName.replace ( " )" , " \\ )" );
You can’t perform that action at this time.
0 commit comments