[QGIS Commit] r11501 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Aug 25 16:45:14 EDT 2009
Author: jef
Date: 2009-08-25 16:45:13 -0400 (Tue, 25 Aug 2009)
New Revision: 11501
Modified:
trunk/qgis/src/app/qgsdbsourceselect.cpp
Log:
cleanup postgres column thread
Modified: trunk/qgis/src/app/qgsdbsourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsdbsourceselect.cpp 2009-08-25 19:54:28 UTC (rev 11500)
+++ trunk/qgis/src/app/qgsdbsourceselect.cpp 2009-08-25 20:45:13 UTC (rev 11501)
@@ -211,6 +211,14 @@
QgsDbSourceSelect::~QgsDbSourceSelect()
{
PQfinish( pd );
+
+ if ( mColumnTypeThread )
+ {
+ mColumnTypeThread->stop();
+ mColumnTypeThread->wait();
+ delete mColumnTypeThread;
+ mColumnTypeThread = NULL;
+ }
}
void QgsDbSourceSelect::populateConnectionList()
@@ -844,7 +852,7 @@
{
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 @@
}
PQclear( gresult );
- if ( mStopped )
- break;
-
// Now tell the layer list dialog box...
emit setLayerType( schemas[i], tables[i], columns[i], type );
}
+
}
PQfinish( pd );
More information about the QGIS-commit
mailing list