diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-08 14:27:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-09 13:12:30 +0200 |
commit | b7abdafcfc42722ab060529864a2109d1e4198c0 (patch) | |
tree | 9709bb6dfd778d7af797d9351ff293a5fba41e40 /vcl/inc | |
parent | 6d008c9e1dbe4240a10c8789860dc30b0cb0b2d5 (diff) |
return and hold SalMenuItem by std::unique_ptr
and drop DestroyMenuItem, all the implementations were just deleting the
pointer
Change-Id: I058817b963988b1e399279f61f45716a2cdba023
Reviewed-on: https://gerrit.libreoffice.org/55500
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/osx/salinst.h | 3 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5Instance.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/salinst.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkinst.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/win/salinst.h | 3 |
5 files changed, 5 insertions, 10 deletions
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 18f8630b0f27..a19e9e423f9b 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -120,8 +120,7 @@ public: virtual bool AnyInput( VclInputFlags nType ) override; virtual SalMenu* CreateMenu( bool bMenuBar, Menu* pVCLMenu ) override; virtual void DestroyMenu( SalMenu* ) override; - virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) override; - virtual void DestroyMenuItem( SalMenuItem* ) override; + virtual std::unique_ptr<SalMenuItem> CreateMenuItem( const SalItemParams & rItemData ) override; virtual OpenGLContext* CreateOpenGLContext() override; virtual OUString GetConnectionIdentifier() override; virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx index aea3e792bfa0..16e22098cd09 100644 --- a/vcl/inc/qt5/Qt5Instance.hxx +++ b/vcl/inc/qt5/Qt5Instance.hxx @@ -82,8 +82,7 @@ public: virtual SalMenu* CreateMenu(bool, Menu*) override; virtual void DestroyMenu(SalMenu* pMenu) override; - virtual SalMenuItem* CreateMenuItem(const SalItemParams*) override; - virtual void DestroyMenuItem(SalMenuItem* pItem) override; + virtual std::unique_ptr<SalMenuItem> CreateMenuItem(const SalItemParams&) override; virtual SalTimer* CreateSalTimer() override; virtual SalSystem* CreateSalSystem() override; diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index c8f330350ad4..3924ee3d497f 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -154,8 +154,7 @@ public: // menus virtual SalMenu* CreateMenu( bool bMenuBar, Menu* pMenu ); virtual void DestroyMenu( SalMenu* pMenu); - virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); - virtual void DestroyMenuItem( SalMenuItem* pItem ); + virtual std::unique_ptr<SalMenuItem> CreateMenuItem( const SalItemParams& pItemData ); // may return NULL to disable session management, only used by X11 backend virtual std::unique_ptr<SalSession> CreateSalSession(); diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index 25d3ff020886..499bacadd5b4 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -200,8 +200,7 @@ public: virtual std::unique_ptr<SalPrinter> CreatePrinter( SalInfoPrinter* pInfoPrinter ) override; virtual SalMenu* CreateMenu( bool, Menu* ) override; virtual void DestroyMenu( SalMenu* pMenu ) override; - virtual SalMenuItem* CreateMenuItem( const SalItemParams* ) override; - virtual void DestroyMenuItem( SalMenuItem* pItem ) override; + virtual std::unique_ptr<SalMenuItem> CreateMenuItem( const SalItemParams& ) override; virtual SalTimer* CreateSalTimer() override; virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override; virtual std::unique_ptr<SalVirtualDevice> diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h index 4274f731ee2b..e96fbc5b56b0 100644 --- a/vcl/inc/win/salinst.h +++ b/vcl/inc/win/salinst.h @@ -74,8 +74,7 @@ public: virtual bool AnyInput( VclInputFlags nType ) override; virtual SalMenu* CreateMenu( bool bMenuBar, Menu* ) override; virtual void DestroyMenu( SalMenu* ) override; - virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) override; - virtual void DestroyMenuItem( SalMenuItem* ) override; + virtual std::unique_ptr<SalMenuItem> CreateMenuItem( const SalItemParams & rItemData ) override; virtual OpenGLContext* CreateOpenGLContext() override; virtual OUString GetConnectionIdentifier() override; virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override; |