Skip to content
Permalink
Browse files

Correctly cleanup auth db connection on thread finished

(doesn't fix the invalid connection issue!)
  • Loading branch information
nyalldawson committed Oct 31, 2018
1 parent ac781fa commit 368286fed0ca2fe752fef083d97235a1eda444f9
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 368286f

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