aboutsummaryrefslogtreecommitdiffstats
path: root/community/qt5-qtwebengine/qtwebkit-chartype.patch
blob: 3b621db1aa82a2d0441c4e28da95af4e77e94204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
--- qtwebengine/src/3rdparty/chromium/base/i18n/unicodestring.h	2017-11-28 14:06:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/base/i18n/unicodestring.h	2018-01-27 19:45:41.595846890 +0100
@@ -18,7 +18,7 @@
 
 inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
 #if U_ICU_VERSION_MAJOR_NUM >= 59
-  return base::string16(icu::toUCharPtr(unistr.getBuffer()),
+  return base::string16(reinterpret_cast<const UChar *>(unistr.getBuffer()),
                         static_cast<size_t>(unistr.length()));
 #else
   return base::string16(unistr.getBuffer(),
--- qtwebengine/src/3rdparty/chromium/base/i18n/string_search.cc	2017-11-28 14:06:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/base/i18n/string_search.cc	2018-01-27 18:35:29.907629612 +0100
@@ -20,7 +20,9 @@
   const string16& dummy = find_this_;
 
   UErrorCode status = U_ZERO_ERROR;
-  search_ = usearch_open(find_this_.data(), find_this_.size(),
-                         dummy.data(), dummy.size(),
+  search_ = usearch_open(reinterpret_cast<const UChar*>(find_this_.data()),
+                         find_this_.size(),
+                         reinterpret_cast<const UChar*>(dummy.data()),
+                         dummy.size(),
                          uloc_getDefault(),
                          NULL,  // breakiter
@@ -43,7 +43,7 @@
 bool FixedPatternStringSearchIgnoringCaseAndAccents::Search(
     const string16& in_this, size_t* match_index, size_t* match_length) {
   UErrorCode status = U_ZERO_ERROR;
-  usearch_setText(search_, in_this.data(), in_this.size(), &status);
+  usearch_setText(search_, reinterpret_cast<const UChar*>(in_this.data()), in_this.size(), &status);
 
   // Default to basic substring search if usearch fails. According to
   // http://icu-project.org/apiref/icu4c/usearch_8h.html, usearch_open will fail
--- qtwebengine/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc	2017-11-28 14:06:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc	2018-01-27 18:57:39.643698212 +0100
@@ -44,7 +44,7 @@
   bidi_ = ubidi_openSized(static_cast<int>(text.length()), 0, &error);
   if (U_FAILURE(error))
     return false;
-  ubidi_setPara(bidi_, text.data(), static_cast<int>(text.length()),
+  ubidi_setPara(bidi_, reinterpret_cast<const UChar*>(text.data()), static_cast<int>(text.length()),
                 GetParagraphLevelForDirection(direction), NULL, &error);
   return (U_SUCCESS(error) == TRUE);
 }
--- qtwebengine/src/3rdparty/chromium/base/i18n/break_iterator.cc	2017-11-28 14:06:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/base/i18n/break_iterator.cc	2018-01-27 19:08:24.185731464 +0100
@@ -59,7 +59,7 @@
       return false;
   }
   if (break_type_ == RULE_BASED) {
-    iter_ = ubrk_openRules(rules_.c_str(),
-                           static_cast<int32_t>(rules_.length()),
-                           string_.data(),
+    iter_ = ubrk_openRules(reinterpret_cast<const UChar *>(rules_.c_str()),
+                           static_cast<int32_t>(rules_.length()),
+                           reinterpret_cast<const UChar *>(string_.data()),
                            static_cast<int32_t>(string_.size()),
@@ -72,7 +72,7 @@
   } else {
     iter_ = ubrk_open(break_type,
                       NULL,
-                      string_.data(),
+                      reinterpret_cast<const UChar*>(string_.data()),
                       static_cast<int32_t>(string_.size()),
                       &status);
     if (U_FAILURE(status)) {
@@ -128,7 +128,7 @@
 bool BreakIterator::SetText(const base::char16* text, const size_t length) {
   UErrorCode status = U_ZERO_ERROR;
   ubrk_setText(static_cast<UBreakIterator*>(iter_),
-               text, length, &status);
+               reinterpret_cast<const UChar *>(text), length, &status);
   pos_ = 0;  // implicit when ubrk_setText is done
   prev_ = npos;
   if (U_FAILURE(status)) {
--- qtwebengine/src/3rdparty/chromium/base/i18n/rtl.cc	2017-11-28 14:06:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/base/i18n/rtl.cc	2018-01-27 19:25:16.283783677 +0100
@@ -212,7 +212,7 @@
 }
 
 TextDirection GetFirstStrongCharacterDirection(const string16& text) {
-  const UChar* string = text.c_str();
+  const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
   size_t length = text.length();
   size_t position = 0;
   while (position < length) {
@@ -228,7 +228,7 @@
 }
 
 TextDirection GetLastStrongCharacterDirection(const string16& text) {
-  const UChar* string = text.c_str();
+  const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
   size_t position = text.length();
   while (position > 0) {
     UChar32 character;
@@ -243,7 +243,7 @@
 }
 
 TextDirection GetStringDirection(const string16& text) {
-  const UChar* string = text.c_str();
+  const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
   size_t length = text.length();
   size_t position = 0;
 
@@ -374,7 +374,7 @@
 #endif  // !OS_WIN
 
 bool StringContainsStrongRTLChars(const string16& text) {
-  const UChar* string = text.c_str();
+  const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
   size_t length = text.length();
   size_t position = 0;
   while (position < length) {
--- qtwebengine/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc	2017-11-28 14:06:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc	2018-01-27 19:51:29.425864834 +0100
@@ -151,7 +151,7 @@
   if (!U_SUCCESS(status))
     return false;
 
-  return ConvertFromUTF16(converter, utf16.c_str(),
+  return ConvertFromUTF16(converter, reinterpret_cast<const UChar *>(utf16.c_str()),
                           static_cast<int>(utf16.length()), on_error, encoded);
 }
 
@@ -178,7 +178,7 @@
 
   SetUpErrorHandlerForToUChars(on_error, converter, &status);
   std::unique_ptr<char16[]> buffer(new char16[uchar_max_length]);
-  int actual_size = ucnv_toUChars(converter, buffer.get(),
+  int actual_size = ucnv_toUChars(converter, reinterpret_cast<UChar *>(buffer.get()),
       static_cast<int>(uchar_max_length), encoded.data(),
       static_cast<int>(encoded.length()), &status);
   ucnv_close(converter);
@@ -205,8 +205,8 @@
   string16 normalized_utf16;
   std::unique_ptr<char16[]> buffer(new char16[max_length]);
   int actual_length = unorm_normalize(
-      utf16.c_str(), utf16.length(), UNORM_NFC, 0,
-      buffer.get(), static_cast<int>(max_length), &status);
+      reinterpret_cast<const UChar *>(utf16.c_str()), utf16.length(), UNORM_NFC, 0,
+      reinterpret_cast<UChar *>(buffer.get()), static_cast<int>(max_length), &status);
   if (!U_SUCCESS(status))
     return false;
   normalized_utf16.assign(buffer.get(), actual_length);
--- qtwebengine/src/3rdparty/chromium/base/i18n/case_conversion.cc	2017-11-28 14:06:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/base/i18n/case_conversion.cc	2018-01-27 19:59:11.955888696 +0100
@@ -65,7 +65,7 @@
     // Don't use WriteInto, which assumes null terminators.
     int32_t new_length = case_mapper(
-        &dest[0], saturated_cast<int32_t>(dest.size()),
-        string.data(), saturated_cast<int32_t>(string.size()),
+        reinterpret_cast<UChar *>(&dest[0]), saturated_cast<int32_t>(dest.size()),
+        reinterpret_cast<const UChar *>(string.data()), saturated_cast<int32_t>(string.size()),
         &error);
     dest.resize(new_length);
   } while (error == U_BUFFER_OVERFLOW_ERROR);