@@ -85,6 +85,21 @@ QgsDataSourceManagerDialog::QgsDataSourceManagerDialog( QWidget *parent ) :
8585 { this ->vectorLayerAdded ( vectorLayerPath, baseName, QStringLiteral ( " WFS" ) ); } );
8686 }
8787
88+ #ifdef HAVE_POSTGRESQL
89+ // ///////////////////////////////////////////////////////////////////////////
90+ // POSTGIS
91+ dlg = providerDialog ( QStringLiteral ( " postgres" ), tr ( " PostgreSQL" ), QStringLiteral ( " /mActionAddPostgisLayer.svg" ) );
92+ if ( dlg )
93+ {
94+ connect ( dlg, SIGNAL ( addDatabaseLayers ( QStringList const &, QString const & ) ),
95+ this , SIGNAL ( addDatabaseLayers ( QStringList const &, QString const & ) ) );
96+ connect ( dlg, SIGNAL ( progress ( int , int ) ),
97+ this , SIGNAL ( showProgress ( int , int ) ) );
98+ connect ( dlg, SIGNAL ( progressMessage ( QString ) ),
99+ this , SIGNAL ( showStatusMessage ( QString ) ) );
100+ }
101+ #endif
102+
88103}
89104
90105QgsDataSourceManagerDialog::~QgsDataSourceManagerDialog ()
@@ -115,7 +130,7 @@ void QgsDataSourceManagerDialog::vectorLayersAdded( const QStringList &layerQStr
115130
116131QDialog *QgsDataSourceManagerDialog::providerDialog ( const QString providerKey, const QString providerName, const QString icon )
117132{
118- QDialog *dlg = dynamic_cast <QDialog *>( QgsProviderRegistry::instance ()->createSelectionWidget ( providerKey, this , Qt::Widget ) );
133+ QDialog *dlg = dynamic_cast <QDialog *>( QgsProviderRegistry::instance ()->createSelectionWidget ( providerKey, this , Qt::Widget, true ) );
119134 if ( !dlg )
120135 {
121136 QMessageBox::warning ( this , providerName, tr ( " Cannot get %1 select dialog from provider %2." ).arg ( providerName, providerKey ) );
0 commit comments