diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-08 13:16:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-09 13:11:25 +0200 |
commit | 84efebb5304b2ebbc03e7743b131ce4d5ad10c03 (patch) | |
tree | 2c85f562f8723f449ff382632a933dcb23a96718 /vcl | |
parent | fa9d10e3350b84c3a249294cad650188dce39538 (diff) |
return SalSession with std::unique_ptr
Change-Id: I85527407c0cd2d3b94565fd7e24b0616948c9b0f
Reviewed-on: https://gerrit.libreoffice.org/55497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpinst.cxx | 5 | ||||
-rw-r--r-- | vcl/inc/headless/svpinst.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/osx/salinst.h | 1 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5Instance.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/salinst.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/unx/salinst.h | 2 | ||||
-rw-r--r-- | vcl/inc/win/salinst.h | 1 | ||||
-rw-r--r-- | vcl/osx/salinst.cxx | 5 | ||||
-rw-r--r-- | vcl/qt5/Qt5Instance.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/app/sm.cxx | 6 | ||||
-rw-r--r-- | vcl/win/app/salinst.cxx | 5 |
12 files changed, 12 insertions, 30 deletions
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 1128f0d61ee6..ad265e335265 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -491,11 +491,6 @@ bool SvpSalInstance::AnyInput( VclInputFlags nType ) return false; } -SalSession* SvpSalInstance::CreateSalSession() -{ - return nullptr; -} - OUString SvpSalInstance::GetConnectionIdentifier() { return OUString(); diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx index 9eef8cdae6f3..cf9ced053c8a 100644 --- a/vcl/inc/headless/svpinst.hxx +++ b/vcl/inc/headless/svpinst.hxx @@ -175,9 +175,6 @@ public: virtual bool IsMainThread() const override; virtual void updateMainThread() override; - // may return NULL to disable session management - virtual SalSession* CreateSalSession() override; - virtual OpenGLContext* CreateOpenGLContext() override; virtual OUString GetConnectionIdentifier() override; diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 6fcb76aec1a7..27d6266501f7 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -123,7 +123,6 @@ public: virtual void DestroyMenu( SalMenu* ) override; virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) override; virtual void DestroyMenuItem( SalMenuItem* ) override; - virtual SalSession* CreateSalSession() 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 cd0e91124412..84eff744d32b 100644 --- a/vcl/inc/qt5/Qt5Instance.hxx +++ b/vcl/inc/qt5/Qt5Instance.hxx @@ -93,8 +93,6 @@ public: virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override; virtual bool AnyInput(VclInputFlags nType) override; - virtual SalSession* CreateSalSession() override; - virtual OpenGLContext* CreateOpenGLContext() override; virtual OUString GetConnectionIdentifier() override; diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 346352486b30..e04d849e4169 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -158,8 +158,8 @@ public: virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); virtual void DestroyMenuItem( SalMenuItem* pItem ); - // may return NULL to disable session management - virtual SalSession* CreateSalSession() = 0; + // may return NULL to disable session management, only used by X11 backend + virtual std::unique_ptr<SalSession> CreateSalSession(); virtual OpenGLContext* CreateOpenGLContext() = 0; diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h index 2e404dbe76e8..d61995f14d23 100644 --- a/vcl/inc/unx/salinst.h +++ b/vcl/inc/unx/salinst.h @@ -72,7 +72,7 @@ public: virtual std::unique_ptr<SalI18NImeStatus> CreateI18NImeStatus() override; virtual SalSystem* CreateSalSystem() override; virtual SalBitmap* CreateSalBitmap() override; - virtual SalSession* CreateSalSession() override; + virtual std::unique_ptr<SalSession> CreateSalSession() override; virtual OpenGLContext* CreateOpenGLContext() override; virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override; diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h index 43902c065324..77e14012b220 100644 --- a/vcl/inc/win/salinst.h +++ b/vcl/inc/win/salinst.h @@ -77,7 +77,6 @@ public: virtual void DestroyMenu( SalMenu* ) override; virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ) override; virtual void DestroyMenuItem( SalMenuItem* ) override; - virtual SalSession* CreateSalSession() override; virtual OpenGLContext* CreateOpenGLContext() override; virtual OUString GetConnectionIdentifier() override; virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override; diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index b7a45c9a4f11..43a288ebd2ed 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -971,11 +971,6 @@ SalBitmap* AquaSalInstance::CreateSalBitmap() return new QuartzSalBitmap(); } -SalSession* AquaSalInstance::CreateSalSession() -{ - return nullptr; -} - OUString AquaSalInstance::getOSVersion() { NSString * versionString = nullptr; diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index 7551a1f0721c..8585ea851c88 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -185,8 +185,6 @@ bool Qt5Instance::DoYield(bool bWait, bool bHandleAllCurrentEvents) bool Qt5Instance::AnyInput(VclInputFlags /*nType*/) { return false; } -SalSession* Qt5Instance::CreateSalSession() { return nullptr; } - OUString Qt5Instance::GetConnectionIdentifier() { return OUString(); } void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, const OUString&) {} diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index ca3b6fb3aa00..1b35c8be0461 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -24,6 +24,7 @@ #include <salprn.hxx> #include <saltimer.hxx> #include <salimestatus.hxx> +#include <salsession.hxx> #include <salsys.hxx> #include <salbmp.hxx> #include <salobj.hxx> @@ -81,6 +82,11 @@ SalInstance::~SalInstance() { } +std::unique_ptr<SalSession> SalInstance::CreateSalSession() +{ + return nullptr; +} + SalMenu* SalInstance::CreateMenu( bool, Menu* ) { // default: no native menus diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx index b38126ad14ae..feb6bbca4d5e 100644 --- a/vcl/unx/generic/app/sm.cxx +++ b/vcl/unx/generic/app/sm.cxx @@ -65,12 +65,12 @@ private: } -SalSession* X11SalInstance::CreateSalSession() +std::unique_ptr<SalSession> X11SalInstance::CreateSalSession() { SAL_INFO("vcl.sm", "X11SalInstance::CreateSalSession"); - SalSession * p = new IceSalSession; - SessionManagerClient::open(p); + std::unique_ptr<SalSession> p(new IceSalSession); + SessionManagerClient::open(p.get()); return p; } diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index c0bd18f85627..652e47636ca2 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -1000,11 +1000,6 @@ const OUString& SalGetDesktopEnvironment() return aDesktopEnvironment; } -SalSession* WinSalInstance::CreateSalSession() -{ - return nullptr; -} - int WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(int, LPEXCEPTION_POINTERS pExceptionInfo) { // Decide if an exception is a c++ (mostly UNO) exception or a process violation. |