Fix another leak

This commit is contained in:
Nyall Dawson 2017-09-06 07:30:46 +10:00
parent 026309d99b
commit 11240121c1

View File

@ -74,23 +74,21 @@ QgsGeoNodeSourceSelect::QgsGeoNodeSourceSelect( QWidget *parent, Qt::WindowFlags
void QgsGeoNodeSourceSelect::addConnectionsEntryList() void QgsGeoNodeSourceSelect::addConnectionsEntryList()
{ {
QgsGeoNodeNewConnection *nc = new QgsGeoNodeNewConnection( this ); QgsGeoNodeNewConnection nc( this );
if ( nc->exec() ) if ( nc.exec() )
{ {
populateConnectionList(); populateConnectionList();
emit connectionsChanged(); emit connectionsChanged();
} }
delete nc;
} }
void QgsGeoNodeSourceSelect::modifyConnectionsEntryList() void QgsGeoNodeSourceSelect::modifyConnectionsEntryList()
{ {
QgsGeoNodeNewConnection *nc = new QgsGeoNodeNewConnection( this, cmbConnections->currentText() ); QgsGeoNodeNewConnection nc( this, cmbConnections->currentText() );
nc->setWindowTitle( tr( "Modify GeoNode connection" ) ); nc.setWindowTitle( tr( "Modify GeoNode connection" ) );
if ( nc->exec() ) if ( nc.exec() )
{ {
populateConnectionList(); populateConnectionList();
emit connectionsChanged(); emit connectionsChanged();