diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp index ff17a52a75..d99bba93ee 100644 --- a/src/corelib/tools/qchar.cpp +++ b/src/corelib/tools/qchar.cpp @@ -1680,6 +1680,8 @@ struct UCS2Pair { ushort u2; }; +inline bool operator<(const UCS2Pair &ligature1, const UCS2Pair &ligature2) +{ return ligature1.u1 < ligature2.u1; } inline bool operator<(ushort u1, const UCS2Pair &ligature) { return u1 < ligature.u1; } inline bool operator<(const UCS2Pair &ligature, ushort u1) @@ -1690,6 +1692,8 @@ struct UCS2SurrogatePair { UCS2Pair p2; }; +inline bool operator<(const UCS2SurrogatePair &ligature1, const UCS2SurrogatePair &ligature2) +{ return QChar::surrogateToUcs4(ligature1.p1.u1, ligature1.p1.u2) < QChar::surrogateToUcs4(ligature2.p1.u1, ligature2.p1.u2); } inline bool operator<(uint u1, const UCS2SurrogatePair &ligature) { return u1 < QChar::surrogateToUcs4(ligature.p1.u1, ligature.p1.u2); } inline bool operator<(const UCS2SurrogatePair &ligature, uint u1) diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index c0cd419c53..ef2dba5700 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -2883,6 +2883,8 @@ static const struct CategoriesRangeMapEntry { { "YijingHexagramSymbols", 0x4DC0, 0x4DFF } }; +inline bool operator<(const CategoriesRangeMapEntry &entry1, const CategoriesRangeMapEntry &entry2) +{ return qstrcmp(entry1.name, entry2.name) < 0; } inline bool operator<(const char *name, const CategoriesRangeMapEntry &entry) { return qstrcmp(name, entry.name) < 0; } inline bool operator<(const CategoriesRangeMapEntry &entry, const char *name)