From cc237438f6d1c7ee3a391b51402aaa71cd347b6b Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 12 Jun 2019 17:07:56 +0200 Subject: [PATCH] qt5: Make it compile with '-Werror=shadow' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following issue for the GCC build with '-Werror=shadow' in place which does not show up in the default build setup since compiler flag '-Wno-shadow' is currently being set in 'RepositoryExternal.mk' for qt5 and kde5. (This will be dropped in a follow-up commit.) .../libreoffice/vcl/qt5/Qt5SvpSurface.cxx: In constructor ‘cairo::Qt5SvpSurface::Qt5SvpSurface(const CairoSurfaceSharedPtr&)’: .../libreoffice/vcl/qt5/Qt5SvpSurface.cxx:24:69: error: declaration of ‘m_pSurface’ shadows a member of ‘cairo::Qt5SvpSurface’ [-Werror=shadow] Qt5SvpSurface::Qt5SvpSurface(const CairoSurfaceSharedPtr& m_pSurface) ^ In file included from .../libreoffice/vcl/qt5/Qt5SvpSurface.cxx:12: .../libreoffice/vcl/inc/qt5/Qt5SvpSurface.hxx:27:27: note: shadowed declaration is here CairoSurfaceSharedPtr m_pSurface; ^~~~~~~~~~ cc1plus: all warnings being treated as errors Change-Id: I501657447e02675f7c6b1c9aaca670ba81715590 Reviewed-on: https://gerrit.libreoffice.org/73891 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/qt5/Qt5SvpSurface.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/qt5/Qt5SvpSurface.cxx b/vcl/qt5/Qt5SvpSurface.cxx index 62fa263c3a3c..00f6004bd2a0 100644 --- a/vcl/qt5/Qt5SvpSurface.cxx +++ b/vcl/qt5/Qt5SvpSurface.cxx @@ -21,10 +21,10 @@ namespace cairo { -Qt5SvpSurface::Qt5SvpSurface(const CairoSurfaceSharedPtr& m_pSurface) +Qt5SvpSurface::Qt5SvpSurface(const CairoSurfaceSharedPtr& pSurface) : m_pGraphics(nullptr) , m_pCairoContext(nullptr) - , m_pSurface(m_pSurface) + , m_pSurface(pSurface) { }