diff options
Diffstat (limited to 'user/kio/cxx17.patch')
-rw-r--r-- | user/kio/cxx17.patch | 21 |
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 |