mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
cleanup postgres column thread
git-svn-id: http://svn.osgeo.org/qgis/trunk@11501 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
20591bac19
commit
ed00f883e1
@ -211,6 +211,14 @@ void QgsDbSourceSelect::setLayerType( QString schema,
|
||||
QgsDbSourceSelect::~QgsDbSourceSelect()
|
||||
{
|
||||
PQfinish( pd );
|
||||
|
||||
if ( mColumnTypeThread )
|
||||
{
|
||||
mColumnTypeThread->stop();
|
||||
mColumnTypeThread->wait();
|
||||
delete mColumnTypeThread;
|
||||
mColumnTypeThread = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void QgsDbSourceSelect::populateConnectionList()
|
||||
@ -844,7 +852,7 @@ void QgsGeomColumnTypeThread::getLayerTypes()
|
||||
{
|
||||
PQsetClientEncoding( pd, QString( "UNICODE" ).toLocal8Bit() );
|
||||
|
||||
for ( uint i = 0; i < schemas.size(); i++ )
|
||||
for ( uint i = 0; i < schemas.size() && !mStopped; i++ )
|
||||
{
|
||||
QString query = QString( "select distinct "
|
||||
"case"
|
||||
@ -871,12 +879,10 @@ void QgsGeomColumnTypeThread::getLayerTypes()
|
||||
}
|
||||
PQclear( gresult );
|
||||
|
||||
if ( mStopped )
|
||||
break;
|
||||
|
||||
// Now tell the layer list dialog box...
|
||||
emit setLayerType( schemas[i], tables[i], columns[i], type );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PQfinish( pd );
|
||||
|
Loading…
x
Reference in New Issue
Block a user