summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/window.hxx4
-rw-r--r--vcl/source/window/window.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 825737078333..aafb1d7d4005 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -593,8 +593,8 @@ public:
SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags );
- SAL_DLLPRIVATE void ImplAddDel( ImplDelData* pDel );
- SAL_DLLPRIVATE void ImplRemoveDel( ImplDelData* pDel );
+ SAL_DLLPRIVATE void ImplAddDel( ImplDelData* pDel ) const;
+ SAL_DLLPRIVATE void ImplRemoveDel( ImplDelData* pDel ) const;
SAL_DLLPRIVATE void ImplCallResize();
SAL_DLLPRIVATE void ImplCallMove();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index cc8973d4ebba..0974d2f6185b 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1395,7 +1395,7 @@ void Window::ImplSetReallyVisible()
}
}
-void Window::ImplAddDel( ImplDelData* pDel ) // TODO: make "const" when incompatibility ok
+void Window::ImplAddDel( ImplDelData* pDel ) const
{
if ( IsDisposed() )
{
@@ -1406,13 +1406,13 @@ void Window::ImplAddDel( ImplDelData* pDel ) // TODO: make "const" when incompat
DBG_ASSERT( !pDel->mpWindow, "Window::ImplAddDel(): cannot add ImplDelData twice !" );
if( !pDel->mpWindow )
{
- pDel->mpWindow = this; // #112873# store ref to this window, so pDel can remove itself
+ pDel->mpWindow = const_cast<vcl::Window*>(this); // #112873# store ref to this window, so pDel can remove itself
pDel->mpNext = mpWindowImpl->mpFirstDel;
mpWindowImpl->mpFirstDel = pDel;
}
}
-void Window::ImplRemoveDel( ImplDelData* pDel ) // TODO: make "const" when incompatibility ok
+void Window::ImplRemoveDel( ImplDelData* pDel ) const
{
pDel->mpWindow = nullptr; // #112873# pDel is not associated with a Window anymore