Skip to content
Permalink
Browse files

Correctly cleanup auth db connection on thread finished

(doesn't fix the invalid connection issue!)

(cherry picked from commit 368286f)
  • Loading branch information
nyalldawson committed Oct 31, 2018
1 parent c068b13 commit 635ecada3c23ddbf3c3d190b4b21659bed04b784
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/auth/qgsauthmanager.cpp
@@ -127,7 +127,7 @@ QSqlDatabase QgsAuthManager::authDatabaseConnection() const
if ( QThread::currentThread() != QgsApplication::instance()->thread() )
{
QgsDebugMsgLevel( QStringLiteral( "Scheduled auth db remove on thread close" ), 0 );
connect( QThread::currentThread(), &QThread::finished, QThread::currentThread(), [connectionName]
connect( QThread::currentThread(), &QThread::finished, this, [connectionName]
{
QgsDebugMsgLevel( QStringLiteral( "Removing outdated connection to %1 on thread exit" ).arg( connectionName ), 0 );
QSqlDatabase::removeDatabase( connectionName );

0 comments on commit 635ecad

Please sign in to comment.
You can’t perform that action at this time.