Skip to content

Commit

Permalink
Use qSort instead of std::sort, former does not crash
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 22, 2015
1 parent 9a64569 commit d5585ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsfeatureiterator.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit d5585ff

Please sign in to comment.