[Libreoffice-commits] core.git: include/vcl vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 31 12:17:33 UTC 2021
include/vcl/transfer.hxx | 3 ++-
vcl/source/treelist/transfer2.cxx | 5 ++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 95e7f977acc81555525565853e42e9df9ff5ebad
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 30 15:23:05 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 31 14:16:59 2021 +0200
osl::Mutex->std::mutex in DragSourceHelper
Change-Id: I886300dc65542f5e716fa970a9804c6084419515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119727
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index 75d81f5fa5db..0b13f504926c 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -41,6 +41,7 @@
#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <memory>
+#include <mutex>
namespace com::sun::star::datatransfer::dnd { class XDragGestureRecognizer; }
namespace com::sun::star::io { class XInputStream; }
@@ -399,7 +400,7 @@ private:
friend class DragSourceHelper::DragGestureListener;
private:
- osl::Mutex maMutex;
+ std::mutex maMutex;
css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > mxDragGestureRecognizer;
css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > mxDragGestureListener;
diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx
index bc654bbb7975..fb7877e60ff1 100644
--- a/vcl/source/treelist/transfer2.cxx
+++ b/vcl/source/treelist/transfer2.cxx
@@ -83,9 +83,8 @@ void DragSourceHelper::dispose()
{
Reference<XDragGestureRecognizer> xTmp;
{
- osl::MutexGuard aGuard( maMutex );
- xTmp = mxDragGestureRecognizer;
- mxDragGestureRecognizer.clear();
+ std::lock_guard aGuard( maMutex );
+ xTmp = std::move(mxDragGestureRecognizer);
}
if( xTmp.is() )
xTmp->removeDragGestureListener( mxDragGestureListener );
More information about the Libreoffice-commits
mailing list