summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-22 10:38:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-08-22 10:38:23 +0200
commit582aa81147557ace37b8ad4aea1bd153eb743c66 (patch)
treea74a2d57d43997ec029e65fd833c3fc458f3f6db /vcl/unx
parent34b6f2e577d7768e2259e7b9637d708bdd979e3a (diff)
Adapt Library_vclplug_kde5 to f05f4e042ca6ac8ae7f1d1e8e6bfb4cbba17a044
..."loplugin:useuniqueptr in SvpSalInstance" Change-Id: I6f3f7c102fcf07f552d3256553dd39e9cd54005f
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/kde5/KDE5SalInstance.cxx11
-rw-r--r--vcl/unx/kde5/KDE5SalInstance.hxx6
2 files changed, 13 insertions, 4 deletions
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; }