Skip to content
Permalink
Browse files
Use lock/unlock directly instead QMutexLocker to avoid compilation pr…
…oblems on Qt6
  • Loading branch information
mhugent committed Nov 17, 2021
1 parent b7330a4 commit a1be5a9685282078fbdb8f249f166e349e1ae7b7
Showing with 3 additions and 6 deletions.
  1. +3 −3 src/core/providers/ogr/qgsogrfeatureiterator.cpp
  2. +0 −3 src/core/providers/ogr/qgsogrfeatureiterator.h
@@ -55,7 +55,7 @@ QgsOgrFeatureIterator::QgsOgrFeatureIterator( QgsOgrFeatureSource *source, bool

if ( mSharedDS )
{
mTransactionDSLocker.reset( new QMutexLocker( &mSharedDS->mutex() ) );
mSharedDS->mutex().lock();
}

/* When inside a transaction for GPKG/SQLite and fetching fid(s) we might be nested inside an outer fetching loop,
@@ -488,9 +488,9 @@ bool QgsOgrFeatureIterator::close()
{
iteratorClosed();
mOgrLayer = nullptr;
mSharedDS.reset();

mClosed = true;
mSharedDS->mutex().unlock();
mSharedDS.reset();
return true;
}

@@ -27,8 +27,6 @@
#include <set>
#include "qgis_sip.h"

#include <QMutexLocker>

///@cond PRIVATE
#define SIP_NO_FILE

@@ -106,7 +104,6 @@ class QgsOgrFeatureIterator final: public QgsAbstractFeatureIteratorFromSource<Q
QgsRectangle mFilterRect;
QgsCoordinateTransform mTransform;
QgsOgrDatasetSharedPtr mSharedDS = nullptr;
std::unique_ptr<QMutexLocker> mTransactionDSLocker = nullptr;

bool mFirstFieldIsFid = false;
QgsFields mFieldsWithoutFid;

0 comments on commit a1be5a9

Please sign in to comment.