mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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:
parent
dfcbab7b63
commit
14a482cf48
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user