include/sfx2/childwin.hxx     |    4 ++--
 sfx2/source/appl/childwin.cxx |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a8c445bb1ecf5a68c3925e3ab19d08f0b44644c9
Author:     Michael Stahl <[email protected]>
AuthorDate: Wed Aug 6 18:04:50 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Aug 8 13:14:39 2025 +0200

    sfx2: fix mysterious -Werror=shadow
    
    GCC 14 now mysteriously finds a -Wshadow here but not in the many other
    SfxChildWindow subclass member functions that have a parameter named
    "pParent":
    
      sw/source/uibase/sidebar/QuickFindPanel.cxx: In constructor 
‘sw::sidebar::QuickFindPanelWrapper::QuickFindPanelWrapper(vcl::Window*, 
sal_uInt16, SfxBindings*, SfxChildWinInfo*)’:
      sw/source/uibase/sidebar/QuickFindPanel.cxx:115:59: error: declaration of 
‘pParent’ shadows a member of ‘sw::sidebar::QuickFindPanelWrapper’ 
[-Werror=shadow]
      115 | QuickFindPanelWrapper::QuickFindPanelWrapper(vcl::Window* pParent, 
sal_uInt16 nId,
          |                                              ~~~~~~~~~~~~~^~~~~~~
      In file included from include/sfx2/quickfind.hxx:13,
                     from sw/source/uibase/inc/QuickFindPanel.hxx:13,
                     from sw/source/uibase/sidebar/QuickFindPanel.cxx:11:
      include/sfx2/childwin.hxx:102:32: note: shadowed declaration is here
      102 |     VclPtr<vcl::Window>        pParent;         // parent window ( 
Topwindow )
          |                                ^~~~~~~
    
    Change-Id: I98228f312308ee69a17af34bb31a5d4109b06ad9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189017
    Reviewed-by: Stephan Bergmann <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 216b101923d4..464016e2770e 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -99,7 +99,7 @@ extern SFX2_DLLPUBLIC bool ParentIsFloatingWindow(const 
vcl::Window *pParent);
 
 class SFX2_DLLPUBLIC SfxChildWindow
 {
-    VclPtr<vcl::Window>        pParent;         // parent window ( Topwindow )
+    VclPtr<vcl::Window>        m_pParent;       // parent window (Topwindow)
     VclPtr<vcl::Window>        pWindow;         // actual contents
     std::unique_ptr< SfxChildWindow_Impl>       pImpl;            // 
Implementation data
     std::shared_ptr<SfxDialogController> xController;     // actual contents
@@ -122,7 +122,7 @@ public:
     std::shared_ptr<SfxDialogController>& GetController() { return 
xController; }
     const std::shared_ptr<SfxDialogController>& GetController() const { return 
xController; }
     vcl::Window*        GetParent() const
-                        { return pParent; }
+                        { return m_pParent; }
     SfxChildAlignment   GetAlignment() const
                         { return eChildAlignment; }
     void                SetAlignment(SfxChildAlignment eAlign);
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 24b114a706b3..14c04f2b05e6 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -143,8 +143,8 @@ bool GetSplitSizeFromString( std::u16string_view rStr, 
Size& rSize )
     return false;
 }
 
-SfxChildWindow::SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId)
-    : pParent(pParentWindow)
+SfxChildWindow::SfxChildWindow(vcl::Window *const pParent, sal_uInt16 nId)
+    : m_pParent(pParent)
     , pImpl(new SfxChildWindow_Impl)
     , eChildAlignment(SfxChildAlignment::NOALIGNMENT)
     , nType(nId)

Reply via email to