From c26764686718f46a22371ea16d683d6bf17b9e66 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 5 Nov 2015 11:03:28 +0400 Subject: Move CasexTraits from qstring.cpp to qunicodetables_p.h and implement TitlecaseTraits as well, to be re-used in the following commit. Change-Id: I5c0bff42fe3b9bc9c2454cc16916cc2be87f604f Reviewed-by: Lars Knoll --- util/unicode/main.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'util') diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 35f5aa9d24..d1713795dd 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -765,6 +765,38 @@ static const char *property_string = "};\n\n" "Q_CORE_EXPORT const Properties * QT_FASTCALL properties(uint ucs4) Q_DECL_NOTHROW;\n" "Q_CORE_EXPORT const Properties * QT_FASTCALL properties(ushort ucs2) Q_DECL_NOTHROW;\n" + "\n" + "struct LowercaseTraits\n" + "{\n" + " static inline signed short caseDiff(const Properties *prop)\n" + " { return prop->lowerCaseDiff; }\n" + " static inline bool caseSpecial(const Properties *prop)\n" + " { return prop->lowerCaseSpecial; }\n" + "};\n" + "\n" + "struct UppercaseTraits\n" + "{\n" + " static inline signed short caseDiff(const Properties *prop)\n" + " { return prop->upperCaseDiff; }\n" + " static inline bool caseSpecial(const Properties *prop)\n" + " { return prop->upperCaseSpecial; }\n" + "};\n" + "\n" + "struct TitlecaseTraits\n" + "{\n" + " static inline signed short caseDiff(const Properties *prop)\n" + " { return prop->titleCaseDiff; }\n" + " static inline bool caseSpecial(const Properties *prop)\n" + " { return prop->titleCaseSpecial; }\n" + "};\n" + "\n" + "struct CasefoldTraits\n" + "{\n" + " static inline signed short caseDiff(const Properties *prop)\n" + " { return prop->caseFoldDiff; }\n" + " static inline bool caseSpecial(const Properties *prop)\n" + " { return prop->caseFoldSpecial; }\n" + "};\n" "\n"; static const char *methods = -- cgit v1.2.3