summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-qt/qt5/qtwebkit/0004-Fix-compilation-with-ICU-59.patch92
-rw-r--r--recipes-qt/qt5/qtwebkit_git.bb1
2 files changed, 93 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebkit/0004-Fix-compilation-with-ICU-59.patch b/recipes-qt/qt5/qtwebkit/0004-Fix-compilation-with-ICU-59.patch
new file mode 100644
index 00000000..e4a108e8
--- /dev/null
+++ b/recipes-qt/qt5/qtwebkit/0004-Fix-compilation-with-ICU-59.patch
@@ -0,0 +1,92 @@
1From d8d9b1eb468f5e5d5d9f0b196fc0acb641998c8b Mon Sep 17 00:00:00 2001
2From: Konstantin Tokarev <annulen@yandex.ru>
3Date: Thu, 4 May 2017 15:12:37 +0300
4Subject: [PATCH] Fix compilation with ICU 59
5
6Upstream fix: https://bugs.webkit.org/show_bug.cgi?id=171612
7
8Task-number: QTBUG-60532
9Change-Id: I6014feea213aa70ebe40b09d9d1a03fd1ed3c843
10Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
11---
12 Source/JavaScriptCore/API/JSStringRef.cpp | 6 +++---
13 Source/JavaScriptCore/runtime/DateConversion.cpp | 3 ++-
14 Source/WTF/wtf/TypeTraits.h | 3 +++
15 Source/WebKit2/Shared/API/c/WKString.cpp | 2 +-
16 4 files changed, 9 insertions(+), 5 deletions(-)
17
18diff --git a/Source/JavaScriptCore/API/JSStringRef.cpp b/Source/JavaScriptCore/API/JSStringRef.cpp
19index 812f3d413..77a3fd0f4 100644
20--- a/Source/JavaScriptCore/API/JSStringRef.cpp
21+++ b/Source/JavaScriptCore/API/JSStringRef.cpp
22@@ -37,7 +37,7 @@ using namespace WTF::Unicode;
23 JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
24 {
25 initializeThreading();
26- return OpaqueJSString::create(chars, numChars).leakRef();
27+ return OpaqueJSString::create(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
28 }
29
30 JSStringRef JSStringCreateWithUTF8CString(const char* string)
31@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string)
32 JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
33 {
34 initializeThreading();
35- return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
36+ return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
37 }
38
39 JSStringRef JSStringRetain(JSStringRef string)
40@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
41
42 const JSChar* JSStringGetCharactersPtr(JSStringRef string)
43 {
44- return string->characters();
45+ return reinterpret_cast<const JSChar*>(string->characters());
46 }
47
48 size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
49diff --git a/Source/JavaScriptCore/runtime/DateConversion.cpp b/Source/JavaScriptCore/runtime/DateConversion.cpp
50index 0b57f012d..05e27338b 100644
51--- a/Source/JavaScriptCore/runtime/DateConversion.cpp
52+++ b/Source/JavaScriptCore/runtime/DateConversion.cpp
53@@ -107,7 +107,8 @@ String formatDateTime(const GregorianDateTime& t, DateTimeFormat format, bool as
54 #if OS(WINDOWS)
55 TIME_ZONE_INFORMATION timeZoneInformation;
56 GetTimeZoneInformation(&timeZoneInformation);
57- const WCHAR* timeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
58+ const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
59+ String timeZoneName(reinterpret_cast<const UChar*>(winTimeZoneName));
60 #else
61 struct tm gtm = t;
62 char timeZoneName[70];
63diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h
64index 9df2c95cf..f5d6121fd 100644
65--- a/Source/WTF/wtf/TypeTraits.h
66+++ b/Source/WTF/wtf/TypeTraits.h
67@@ -72,6 +72,9 @@ namespace WTF {
68 template<> struct IsInteger<unsigned long> { static const bool value = true; };
69 template<> struct IsInteger<long long> { static const bool value = true; };
70 template<> struct IsInteger<unsigned long long> { static const bool value = true; };
71+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
72+ template<> struct IsInteger<char16_t> { static const bool value = true; };
73+#endif
74 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
75 template<> struct IsInteger<wchar_t> { static const bool value = true; };
76 #endif
77diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp
78index cbac67dd8..23400a64e 100644
79--- a/Source/WebKit2/Shared/API/c/WKString.cpp
80+++ b/Source/WebKit2/Shared/API/c/WKString.cpp
81@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
82 size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
83 {
84 COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
85- return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
86+ return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
87 }
88
89 size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
90--
912.13.3
92
diff --git a/recipes-qt/qt5/qtwebkit_git.bb b/recipes-qt/qt5/qtwebkit_git.bb
index 4845d0fd..3c52ef3c 100644
--- a/recipes-qt/qt5/qtwebkit_git.bb
+++ b/recipes-qt/qt5/qtwebkit_git.bb
@@ -22,6 +22,7 @@ SRC_URI += "\
22 file://0001-qtwebkit-fix-QA-issue-bad-RPATH.patch \ 22 file://0001-qtwebkit-fix-QA-issue-bad-RPATH.patch \
23 file://0002-Remove-TEXTREL-tag-in-x86.patch \ 23 file://0002-Remove-TEXTREL-tag-in-x86.patch \
24 file://0003-Exclude-backtrace-API-for-non-glibc-libraries.patch \ 24 file://0003-Exclude-backtrace-API-for-non-glibc-libraries.patch \
25 file://0004-Fix-compilation-with-ICU-59.patch \
25" 26"
26 27
27PACKAGECONFIG ??= "gstreamer qtlocation qtmultimedia qtsensors qtwebchannel \ 28PACKAGECONFIG ??= "gstreamer qtlocation qtmultimedia qtsensors qtwebchannel \