summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp')
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index 47900204e7..acff6a55ba 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -49,12 +49,19 @@
# include <pthread.h>
#endif
+#include <algorithm>
+
// At least these specific versions of MSVC2010 has a severe performance problem with this file,
// taking about 1 hour to compile if the portion making use of variadic macros is enabled.
#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 160030319) && (_MSC_FULL_VER <= 160040219)
# define TST_QMETATYPE_BROKEN_COMPILER
#endif
+// mingw gcc 4.8 also takes way too long, letting the CI system abort the test
+#if defined(__MINGW32__)
+# define TST_QMETATYPE_BROKEN_COMPILER
+#endif
+
Q_DECLARE_METATYPE(QMetaType::Type)
class tst_QMetaType: public QObject
@@ -2148,7 +2155,7 @@ void tst_QMetaType::compareCustomType()
{
QFETCH(QVariantList, unsorted);
QFETCH(QVariantList, sorted);
- qSort(unsorted);
+ std::sort(unsorted.begin(), unsorted.end());
QCOMPARE(unsorted, sorted);
}