Skip to content
Permalink
Browse files
Fix build on old qt
  • Loading branch information
nyalldawson committed Jun 8, 2021
1 parent 2abf1ca commit aae2ce185cac1aaa4e8b8d56088015c0ae2b26e6
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/qgscachedfeatureiterator.cpp
@@ -53,7 +53,14 @@ QgsCachedFeatureIterator::QgsCachedFeatureIterator( QgsVectorLayerCache *vlCache
break;

default:
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
mFeatureIds.clear();
mFeatureIds.reserve( static_cast< int >( mVectorLayerCache->mCacheOrderedKeys.size() ) );
for ( auto it = mVectorLayerCache->mCacheOrderedKeys.begin(); it != mVectorLayerCache->mCacheOrderedKeys.end(); ++it )
mFeatureIds << *it;
#else
mFeatureIds = QList( mVectorLayerCache->mCacheOrderedKeys.begin(), mVectorLayerCache->mCacheOrderedKeys.end() );
#endif
break;
}

0 comments on commit aae2ce1

Please sign in to comment.