diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-28 10:28:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-31 15:19:31 +0200 |
commit | 9abedad72c73ad83b66f3f8d261efdc5ce889683 (patch) | |
tree | 3ba0c1eb510904b81f605301a4756050d187667b /include | |
parent | 6034b642581803e2cb2566abe0a0cab0cbfeb50a (diff) |
Drop Window::IsDisposed
in favour of the isDisposed in the VclReferenceBase base class,
so we have one flag for this instead of two.
Change-Id: Ib3d6ba750f95f21996bab2838af4c56295a13f4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113249
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/vclreferencebase.hxx | 8 | ||||
-rw-r--r-- | include/vcl/window.hxx | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/vcl/vclreferencebase.hxx b/include/vcl/vclreferencebase.hxx index b7dc2b9183a2..2ba39026a362 100644 --- a/include/vcl/vclreferencebase.hxx +++ b/include/vcl/vclreferencebase.hxx @@ -22,11 +22,14 @@ #include <vcl/dllapi.h> #include <osl/interlck.h> +class VclBuilder; + class VCL_DLLPUBLIC VclReferenceBase { mutable oslInterlockedCount mnRefCnt; template<typename T> friend class VclPtr; + friend class ::VclBuilder; // needed by ::delete_by_window(vcl::Window *pWindow) public: void acquire() const @@ -54,14 +57,15 @@ private: protected: VclReferenceBase(); -protected: virtual ~VclReferenceBase(); -protected: + // This is only supposed to be called from disposeOnce virtual void dispose(); public: + // This is normally supposed to be called from VclPtr::disposeAndClear void disposeOnce(); + bool isDisposed() const { return mbDisposed; } }; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 9d8c5ae954c5..1cdb347a486e 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -60,6 +60,7 @@ class VCLXWindow; class VclWindowEvent; class AllSettings; class InputContext; +class VclEventListeners; enum class ImplPaintFlags; enum class VclEventId; enum class PointerStyle; @@ -472,6 +473,7 @@ class VCL_DLLPUBLIC Window : public virtual VclReferenceBase friend class ::ImplBorderWindow; friend class ::PaintHelper; friend class ::LifecycleTest; + friend class ::VclEventListeners; // TODO: improve missing functionality // only required because of SetFloatingMode() @@ -796,7 +798,6 @@ public: bool IsMenuFloatingWindow() const; bool IsToolbarFloatingWindow() const; bool IsTopWindow() const; - bool IsDisposed() const; SystemWindow* GetSystemWindow() const; /// Can the widget derived from this Window do the double-buffering via RenderContext properly? |