include/sfx2/childwin.hxx | 4 ++-- sfx2/source/appl/childwin.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 6c6c5227f36015ad46e18658b94f0e462996b7a0 Author: Michael Stahl <[email protected]> AuthorDate: Wed Aug 6 18:04:50 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Mon Nov 10 19:22:41 2025 +0100 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]> (cherry picked from commit a8c445bb1ecf5a68c3925e3ab19d08f0b44644c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193750 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 86cfe0aefdab..def7c5478a12 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -98,7 +98,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 @@ -124,7 +124,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 fb35a06acf63..31d46517d80b 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -144,8 +144,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)
