Files
qt6-base/0001-Rename-variable-being-shadowed.patch
Fabian Vogt d01c2bdd92 This fixes an issue with libcamera 0.5.0 in SLFO's Staging:V
- Add patch to rename a variable that was being shadowed and which
  made apps that use -Werror=shadow and include this header fail
  to build. Submitted upstream at
  https://codereview.qt-project.org/c/qt/qtbase/+/638284 :
  * 0001-Rename-variable-being-shadowed.patch

OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/qt6-base?expand=0&rev=136
2025-04-09 10:20:40 +00:00

41 lines
2.2 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
From 282a959ed771e5598a4d1d4e9d6c1a5a2d5e6286 Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <larrosa@kde.org>
Date: Wed, 9 Apr 2025 08:02:06 +0200
Subject: [PATCH] Rename variable being shadowed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Otherwise building any application that includes this header while using -Werror=shadow fails with:
[ 89s] /usr/include/qt6/QtCore/qtmochelpers.h:563:36: in constexpr expansion of (& methods)->QtMocHelpers::UintData<QtMocHelpers::SignalData<void(libcamera::FrameBuffer*)> >::copyTo<{anonymous}::qt_meta_tag_ZN12ViewFinderGLE_t, QtMocHelpers::MetaObjectContents<24, 10, 60, 3> >(result, ((size_t)dataoffset), metatypeoffset)
[ 89s] /usr/include/qt6/QtCore/qtmochelpers.h:201:57: error: declaration of entry shadows a member of QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int, 0>, QtMocHelpers::SignalData<void(libcamera::FrameBuffer*)> > [-Werror=shadow]
[ 89s] 201 | [[maybe_unused]] auto invoke = [&f](const auto &entry) { f(entry.entry); return 0; };
[ 89s] | ~~~~~~~~~~~~^~~~~
[ 89s] /usr/include/qt6/QtCore/qtmochelpers.h:180:7: note: shadowed declaration is here
[ 89s] 180 | T entry;
[ 89s] | ^~~~~
[ 89s] cc1plus: all warnings being treated as errors
Change-Id: I7a3e48fc98acbfabf611b6be813b8576c7168499
---
src/corelib/kernel/qtmochelpers.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/corelib/kernel/qtmochelpers.h b/src/corelib/kernel/qtmochelpers.h
index 3099389b872..4c549e78ad5 100644
--- a/src/corelib/kernel/qtmochelpers.h
+++ b/src/corelib/kernel/qtmochelpers.h
@@ -198,7 +198,7 @@ template <int... Idx, typename... T> struct UintDataStorage<std::integer_sequenc
template <typename F> constexpr void forEach(F &&f) const
{
- [[maybe_unused]] auto invoke = [&f](const auto &entry) { f(entry.entry); return 0; };
+ [[maybe_unused]] auto invoke = [&f](const auto &entry_) { f(entry_.entry); return 0; };
int dummy[] = {
0,
invoke(static_cast<const UintDataEntry<Idx, T> &>(*this))...
--
2.49.0