--- orig/qt-adsk-4.8.2/src/corelib/tools/qalgorithms.h 2012-04-26 15:46:08.000000000 -0400 +++ qt-adsk-4.8.2/src/corelib/tools/qalgorithms.h 2013-03-12 11:26:12.000000000 -0400 @@ -337,8 +337,15 @@ namespace QAlgorithmsPrivate { template +#ifndef QT_NO_STL +Q_OUTOFLINE_TEMPLATE void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T & , LessThan lessThan) +#else Q_OUTOFLINE_TEMPLATE void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan) +#endif { +#ifndef QT_NO_STL + std::sort(start, end, lessThan); +#else top: int span = int(end - start); if (span < 2) @@ -387,6 +394,7 @@ start = low + 1; ++end; goto top; +#endif } template @@ -447,8 +455,15 @@ } template +#ifndef QT_NO_STL +Q_OUTOFLINE_TEMPLATE void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T & , LessThan lessThan) +#else Q_OUTOFLINE_TEMPLATE void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan) +#endif { +#ifndef QT_NO_STL + std::stable_sort(begin, end, lessThan); +#else const int span = end - begin; if (span < 2) return; @@ -457,6 +472,7 @@ qStableSortHelper(begin, middle, t, lessThan); qStableSortHelper(middle, end, t, lessThan); qMerge(begin, middle, end, t, lessThan); +#endif } template