summaryrefslogtreecommitdiffstats
path: root/external/libqxp
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-08-28 09:00:14 +0200
committerDavid Tardon <dtardon@redhat.com>2017-08-28 09:00:14 +0200
commit2539d5b39a41d80d2cafed12a66044e9b029263a (patch)
tree8adbd698c18b14726de8800381e44a707071b629 /external/libqxp
parentintegrate libqxp (diff)
downloadcore-2539d5b39a41d80d2cafed12a66044e9b029263a.tar.gz
core-2539d5b39a41d80d2cafed12a66044e9b029263a.zip
blind attempt to fix windows build error
Change-Id: I88b32543af58dc6f917348b19a0d0d3d50fc8ffe
Diffstat (limited to 'external/libqxp')
-rw-r--r--external/libqxp/0001-WaE-narrowing-conversion.patch.128
-rw-r--r--external/libqxp/UnpackedTarball_libqxp.mk1
2 files changed, 29 insertions, 0 deletions
diff --git a/external/libqxp/0001-WaE-narrowing-conversion.patch.1 b/external/libqxp/0001-WaE-narrowing-conversion.patch.1
new file mode 100644
index 000000000000..0c73c0501f3c
--- /dev/null
+++ b/external/libqxp/0001-WaE-narrowing-conversion.patch.1
@@ -0,0 +1,28 @@
+From 3d0b78eb855dc3797e614a72019afbebbebc536a Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Mon, 28 Aug 2017 08:58:10 +0200
+Subject: [PATCH] WaE: narrowing conversion
+
+error C2398: Element '3': conversion from 'unsigned __int64' to 'unsigned long' requires a narrowing conversion
+---
+ src/lib/QXPContentCollector.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/QXPContentCollector.cpp b/src/lib/QXPContentCollector.cpp
+index 6a227a6..9c3076d 100644
+--- a/src/lib/QXPContentCollector.cpp
++++ b/src/lib/QXPContentCollector.cpp
+@@ -943,7 +943,9 @@ void QXPContentCollector::drawText(const std::shared_ptr<Text> &text, const Link
+ break;
+ }
+
+- const unsigned long spanTextEnd = std::min<unsigned long>({ charFormat.afterEndIndex(), paragraph.afterEndIndex(), text->text.length(), textEnd });
++ const auto spanTextEnd = static_cast<unsigned long>(
++ std::min<uint64_t>({ charFormat.afterEndIndex(), paragraph.afterEndIndex(), text->text.length(), textEnd })
++ );
+
+ if (charFormat.format->isControlChars)
+ {
+--
+2.13.0
+
diff --git a/external/libqxp/UnpackedTarball_libqxp.mk b/external/libqxp/UnpackedTarball_libqxp.mk
index e20b7f94ecee..340fc9397964 100644
--- a/external/libqxp/UnpackedTarball_libqxp.mk
+++ b/external/libqxp/UnpackedTarball_libqxp.mk
@@ -24,6 +24,7 @@ endif
$(eval $(call gb_UnpackedTarball_add_patches,libqxp, \
external/libqxp/0001-don-t-use-RVNGStringStream-in-the-main-lib.patch.1 \
external/libqxp/0001-add-missing-includes.patch.1 \
+ external/libqxp/0001-WaE-narrowing-conversion.patch.1 \
))
# vim: set noet sw=4 ts=4: