cleaned up memory management of postgresql queries and connection objects

git-svn-id: http://svn.osgeo.org/qgis/trunk@588 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2004-01-25 07:36:21 +00:00
parent dfcbab7b63
commit 14a482cf48
2 changed files with 3 additions and 2 deletions

View File

@ -199,6 +199,7 @@ void QgsDbSourceSelect::dbConnect()
QMessageBox::warning(this, tr("Connection failed"),
tr("Connection to %1 on %2 failed. Either the database is down or your settings are incorrect.%3Check your username and password and try again.").arg(settings.readEntry(key + "/database")).arg(settings.readEntry(key + "/host")).arg("\n\n"));
}
PQfinish(pd);
}
}

View File

@ -16,7 +16,6 @@
***************************************************************************/
/* $Id$ */
#include <iostream>
#include <qsqldatabase.h>
#include <qsettings.h>
#include <qlineedit.h>
#include <qcheckbox.h>
@ -64,7 +63,8 @@ void QgsNewConnection::testConnection()
} else {
QMessageBox::information(this, tr("Test connection"), tr("Connection failed - Check settings and try again "));
}
delete pd;
// free pg connection resources
PQfinish(pd);
}