Skip to content

Commit

Permalink
Remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 20, 2018
1 parent fd934d8 commit aa62f3a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 96 deletions.
84 changes: 0 additions & 84 deletions src/app/qgisapp.cpp
Expand Up @@ -5095,37 +5095,6 @@ void QgisApp::addDatabaseLayers( QStringList const &layerPathList, QString const
QApplication::restoreOverrideCursor();
}


void QgisApp::addSpatiaLiteLayer()
{
// show the SpatiaLite dialog
QDialog *dbs = dynamic_cast<QDialog *>( QgsProviderRegistry::instance()->createSelectionWidget( QStringLiteral( "spatialite" ), this ) );
if ( !dbs )
{
QMessageBox::warning( this, tr( "Add SpatiaLite Layer" ), tr( "Cannot get SpatiaLite select dialog from provider." ) );
return;
}
connect( dbs, SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ),
this, SLOT( addDatabaseLayers( QStringList const &, QString const & ) ) );
dbs->exec();
delete dbs;
} // QgisApp::addSpatiaLiteLayer()

void QgisApp::addDelimitedTextLayer()
{
// show the Delimited text dialog
QDialog *dts = dynamic_cast<QDialog *>( QgsProviderRegistry::instance()->createSelectionWidget( QStringLiteral( "delimitedtext" ), this ) );
if ( !dts )
{
QMessageBox::warning( this, tr( "Add Delimited Text Layer" ), tr( "Cannot get Delimited Text select dialog from provider." ) );
return;
}
connect( dts, SIGNAL( addVectorLayer( QString, QString, QString ) ),
this, SLOT( addSelectedVectorLayer( QString, QString, QString ) ) );
dts->exec();
delete dts;
} // QgisApp::addDelimitedTextLayer()

void QgisApp::addVirtualLayer()
{
// show the Delimited text dialog
Expand Down Expand Up @@ -5167,59 +5136,6 @@ void QgisApp::replaceSelectedVectorLayer( const QString &oldId, const QString &u
QgsProject::instance()->removeMapLayer( oldLayer );
} // QgisApp:replaceSelectedVectorLayer

void QgisApp::addMssqlLayer()
{
// show the MSSQL dialog
QDialog *dbs = dynamic_cast<QDialog *>( QgsProviderRegistry::instance()->createSelectionWidget( QStringLiteral( "mssql" ), this ) );
if ( !dbs )
{
QMessageBox::warning( this, tr( "Add MSSQL Layer" ), tr( "Cannot get MSSQL select dialog from provider." ) );
return;
}
connect( dbs, SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ),
this, SLOT( addDatabaseLayers( QStringList const &, QString const & ) ) );
dbs->exec();
delete dbs;
} // QgisApp::addMssqlLayer()

void QgisApp::addDb2Layer()
{
// show the DB2 dialog
QgsDebugMsg( "Show dialog for DB2 " );
QDialog *dbs = dynamic_cast<QDialog *>( QgsProviderRegistry::instance()->createSelectionWidget( QStringLiteral( "DB2" ), this ) );
if ( !dbs )
{
QMessageBox::warning( this, tr( "Add DB2 Layer" ), tr( "Cannot get DB2 select dialog from provider." ) );
return;
}
connect( dbs, SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ),
this, SLOT( addDatabaseLayers( QStringList const &, QString const & ) ) );
dbs->exec();
delete dbs;
} // QgisApp::addDb2Layer()

void QgisApp::addOracleLayer()
{
#ifdef HAVE_ORACLE
// show the Oracle dialog
QDialog *dbs = dynamic_cast<QDialog *>( QgsProviderRegistry::instance()->createSelectionWidget( "oracle", this ) );
if ( !dbs )
{
QMessageBox::warning( this, tr( "Add Oracle Layer" ), tr( "Cannot get Oracle 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::addOracleLayer()


void QgisApp::fileExit()
{
if ( QgsApplication::taskManager()->countActiveTasks() > 0 )
Expand Down
12 changes: 0 additions & 12 deletions src/app/qgisapp.h
Expand Up @@ -1045,22 +1045,10 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow

//! Add a list of database layers to the map
void addDatabaseLayers( QStringList const &layerPathList, QString const &providerKey );
//! Add a SpatiaLite layer to the map
void addSpatiaLiteLayer();
//! Add a Delimited Text layer to the map
void addDelimitedTextLayer();
//! Add a vector layer defined by uri, layer name, data source uri
void addSelectedVectorLayer( const QString &uri, const QString &layerName, const QString &provider );
//! Replace the selected layer by a vector layer defined by uri, layer name, data source uri
void replaceSelectedVectorLayer( const QString &oldId, const QString &uri, const QString &layerName, const QString &provider );
//! Add a MSSQL layer to the map
void addMssqlLayer();
//! Add a DB2 layer to the map
void addDb2Layer();
//#ifdef HAVE_ORACLE
//! Add a Oracle layer to the map
void addOracleLayer();
//#endif
//! Add a virtual layer
void addVirtualLayer();
//! toggles whether the current selected layer is in overview or not
Expand Down

0 comments on commit aa62f3a

Please sign in to comment.