Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 20, 2018
1 parent 2191db4 commit cea8b55
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
24 changes: 0 additions & 24 deletions src/app/qgisapp.cpp
Expand Up @@ -5023,30 +5023,6 @@ void QgisApp::askUserForOGRSublayers( QgsVectorLayer *layer )
}
}

void QgisApp::addDatabaseLayer()
{
#ifdef HAVE_POSTGRESQL
// Fudge for now
QgsDebugMsg( "about to addRasterLayer" );

// TODO: QDialog for now, switch to QWidget in future
QDialog *dbs = dynamic_cast<QDialog *>( QgsProviderRegistry::instance()->createSelectionWidget( QStringLiteral( "postgres" ), this ) );
if ( !dbs )
{
QMessageBox::warning( this, tr( "Add PostgreSQL Layer" ), tr( "Cannot get PostgreSQL select dialog from provider." ) );
return;
}
connect( dbs, SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ),
this, SLOT( addDatabaseLayers( QStringList const &, QString const & ) ) );
connect( dbs, SIGNAL( progress( int, int ) ),
this, SLOT( showProgress( int, int ) ) );
connect( dbs, SIGNAL( progressMessage( QString ) ),
this, SLOT( showStatusMessage( QString ) ) );
dbs->exec();
delete dbs;
#endif
} // QgisApp::addDatabaseLayer()

void QgisApp::addDatabaseLayers( QStringList const &layerPathList, QString const &providerKey )
{
QList<QgsMapLayer *> myList;
Expand Down
5 changes: 1 addition & 4 deletions src/app/qgisapp.h
Expand Up @@ -1042,10 +1042,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void sponsors();
//! About QGIS
void about();
//#ifdef HAVE_POSTGRESQL
//! Add a databaselayer to the map
void addDatabaseLayer();
//#endif

//! Add a list of database layers to the map
void addDatabaseLayers( QStringList const &layerPathList, QString const &providerKey );
//! Add a SpatiaLite layer to the map
Expand Down

0 comments on commit cea8b55

Please sign in to comment.