vcl/unx/kde5/KDE5SalInstance.cxx | 11 ++++++++--- vcl/unx/kde5/KDE5SalInstance.hxx | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-)
New commits: commit 582aa81147557ace37b8ad4aea1bd153eb743c66 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Aug 22 10:38:23 2018 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Aug 22 10:38:23 2018 +0200 Adapt Library_vclplug_kde5 to f05f4e042ca6ac8ae7f1d1e8e6bfb4cbba17a044 ..."loplugin:useuniqueptr in SvpSalInstance" Change-Id: I6f3f7c102fcf07f552d3256553dd39e9cd54005f diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx index fecf22b49037..ec117b2104fc 100644 --- a/vcl/unx/kde5/KDE5SalInstance.cxx +++ b/vcl/unx/kde5/KDE5SalInstance.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <utility> + //#include "KDE4FilePicker.hxx" #include <QtCore/QAbstractEventDispatcher> #include <QtCore/QThread> @@ -24,6 +28,7 @@ #include <QtGui/QClipboard> #include <QtWidgets/QFrame> +#include <o3tl/make_unique.hxx> #include <osl/process.h> #include <sal/log.hxx> @@ -34,8 +39,8 @@ using namespace com::sun::star; -KDE5SalInstance::KDE5SalInstance(SalYieldMutex* pMutex) - : Qt5Instance(pMutex, true) +KDE5SalInstance::KDE5SalInstance(std::unique_ptr<SalYieldMutex> pMutex) + : Qt5Instance(std::move(pMutex), true) { ImplSVData* pSVData = ImplGetSVData(); delete pSVData->maAppData.mpToolkitName; @@ -130,7 +135,7 @@ VCLPLUG_KDE5_PUBLIC SalInstance* create_SalInstance() QApplication::setQuitOnLastWindowClosed(false); - KDE5SalInstance* pInstance = new KDE5SalInstance(new SalYieldMutex()); + KDE5SalInstance* pInstance = new KDE5SalInstance(o3tl::make_unique<SalYieldMutex>()); // initialize SalData new KDE5SalData(pInstance); diff --git a/vcl/unx/kde5/KDE5SalInstance.hxx b/vcl/unx/kde5/KDE5SalInstance.hxx index 0bf30ab8b235..affd89715f9e 100644 --- a/vcl/unx/kde5/KDE5SalInstance.hxx +++ b/vcl/unx/kde5/KDE5SalInstance.hxx @@ -19,6 +19,10 @@ #pragma once +#include <sal/config.h> + +#include <memory> + #include <qt5/Qt5Instance.hxx> #include "KDE5SalFrame.hxx" @@ -28,7 +32,7 @@ class SalFrame; class KDE5SalInstance : public Qt5Instance { public: - explicit KDE5SalInstance(SalYieldMutex* pMutex); + explicit KDE5SalInstance(std::unique_ptr<SalYieldMutex> pMutex); virtual SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle) override; virtual bool hasNativeFileSelection() const override { return true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits