summaryrefslogtreecommitdiff
path: root/user/kio/cxx17.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-06-04 16:52:38 -0500
committerZach van Rijn <me@zv.io>2022-10-21 18:34:01 -0500
commit18d37b40a1dff05c8e75928dfdf851bf2f1acf8b (patch)
tree2aa60b0e6a8f7f95a90ef159815c7c2dc675d223 /user/kio/cxx17.patch
parentdadb2364fa576f1b9d7e01fe26de6fae296c5844 (diff)
downloadpackages-18d37b40a1dff05c8e75928dfdf851bf2f1acf8b.tar.gz
packages-18d37b40a1dff05c8e75928dfdf851bf2f1acf8b.tar.bz2
packages-18d37b40a1dff05c8e75928dfdf851bf2f1acf8b.tar.xz
packages-18d37b40a1dff05c8e75928dfdf851bf2f1acf8b.zip
user/[KDE Frameworks]: Update to 5.94.0
Many frameworks have added or removed dependencies. Documentation builds have been fixed for new tag file dependencies. * KIO: Fix build on GCC 8. * Prison: Ensure QR and DTMX barcodes are generated properly on big-endian systems. * Syndication: New framework.
Diffstat (limited to 'user/kio/cxx17.patch')
-rw-r--r--user/kio/cxx17.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/user/kio/cxx17.patch b/user/kio/cxx17.patch
new file mode 100644
index 000000000..d73e93b65
--- /dev/null
+++ b/user/kio/cxx17.patch
@@ -0,0 +1,21 @@
+G++ does not have transform_reduce until C++20, despite being part of the
+C++17 standard. This reverts the only usage of Parallelism TR2 in KIO.
+
+--- kio-5.94.0/src/filewidgets/kurlnavigator.cpp.old 2022-05-12 07:14:39.000000000 -0500
++++ kio-5.94.0/src/filewidgets/kurlnavigator.cpp 2022-06-03 01:42:48.541164895 -0500
+@@ -729,11 +729,11 @@
+ availableWidth -= m_protocols->width();
+ }
+
+- auto MinWidth = [](const KUrlNavigatorButton *button) {
+- return button->minimumWidth();
+- };
+ // Check whether buttons must be hidden at all...
+- const int requiredButtonWidth = std::transform_reduce(m_navButtons.cbegin(), m_navButtons.cend(), 0, std::plus<>(), MinWidth);
++ int requiredButtonWidth = 0;
++ for (const KUrlNavigatorButton *button : std::as_const(m_navButtons)) {
++ requiredButtonWidth += button->minimumWidth();
++ }
+
+ if (requiredButtonWidth > availableWidth) {
+ // At least one button must be hidden. This implies that the