Skip to content

Commit

Permalink
Move worker deleteLater to the dtor
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jan 13, 2021
1 parent 4b1899e commit 3ab4497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsqueryresultmodel.cpp
Expand Up @@ -25,7 +25,6 @@ QgsQueryResultModel::QgsQueryResultModel( const QgsAbstractDatabaseProviderConne
{
mWorker = new QgsQueryResultFetcher( &mQueryResult );
mWorker->moveToThread( &mWorkerThread );
connect( &mWorkerThread, &QThread::finished, mWorker, &QObject::deleteLater );
connect( &mWorkerThread, &QThread::started, mWorker, &QgsQueryResultFetcher::fetchRows );
connect( mWorker, &QgsQueryResultFetcher::rowsReady, this, &QgsQueryResultModel::newRowsReady );
mWorkerThread.start();
Expand All @@ -46,6 +45,7 @@ QgsQueryResultModel::~QgsQueryResultModel()
mWorker->stopFetching();
mWorkerThread.quit();
mWorkerThread.wait();
mWorker->deleteLater();
}
}

Expand Down

0 comments on commit 3ab4497

Please sign in to comment.