Skip to content
Permalink
Browse files

Use qSort instead of std::sort, former does not crash

  • Loading branch information
m-kuhn committed Dec 22, 2015
1 parent 9a64569 commit d5585ffdcd3b21e518a10d85c374635352573e88
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsfeatureiterator.cpp
@@ -286,7 +286,7 @@ void QgsAbstractFeatureIterator::setupOrderBy( const QList<QgsFeatureRequest::Or
mCachedFeatures.append( indexedFeature );
}

std::sort( mCachedFeatures.begin(), mCachedFeatures.end(), QgsExpressionSorter( preparedOrderBys ) );
qSort( mCachedFeatures.begin(), mCachedFeatures.end(), QgsExpressionSorter( preparedOrderBys ) );

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Jan 11, 2016

Author Member

@nyalldawson not sure, was it you who requested this change? I just ran into this: http://doc.qt.io/qt-5/qtalgorithms.html#porting-guidelines so this is deprecated in qt as of qt5 in favor of std::sort, so I wonder why it crashes.


mFeatureIterator = mCachedFeatures.constBegin();
mUseCachedFeatures = true;

0 comments on commit d5585ff

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