desktop/source/deployment/gui/dp_gui_dialog2.cxx | 8 ++++---- desktop/source/deployment/gui/dp_gui_dialog2.hxx | 2 +- desktop/source/deployment/manager/dp_manager.cxx | 2 +- desktop/source/deployment/manager/dp_manager.h | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit cb9713daa1a2ce0d5551fa10d6cc12084730fa58 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Mar 7 13:47:18 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 8 09:34:04 2023 +0000 osl::Mutex->std::mutex in ExtMgrDialog Change-Id: I6e0997b1f4fb49459637ce82178c33460eed1188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 528d92fd5328..f0ad04cb3217 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -777,7 +777,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleCloseBtn, weld::Button&, void) IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface, void ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); bool bLockInterface = static_cast<bool>(_bLockInterface); if ( m_bStartProgress && !m_bHasProgress ) @@ -816,7 +816,7 @@ IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface, void ) void ExtMgrDialog::showProgress( bool _bStart ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); bool bStart = _bStart; @@ -842,7 +842,7 @@ void ExtMgrDialog::updateProgress( const tools::Long nProgress ) { if ( m_nProgress != nProgress ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); m_nProgress = nProgress; m_aIdle.Start(); } @@ -852,7 +852,7 @@ void ExtMgrDialog::updateProgress( const tools::Long nProgress ) void ExtMgrDialog::updateProgress( const OUString &rText, const uno::Reference< task::XAbortChannel > &xAbortChannel) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); m_xAbortChannel = xAbortChannel; m_sProgressText = rText; diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 8802997e2f20..b235aed18589 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -92,7 +92,7 @@ class ExtMgrDialog : public weld::GenericDialogController { const OUString m_sAddPackages; OUString m_sProgressText; - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; bool m_bHasProgress; bool m_bProgressChanged; bool m_bStartProgress; commit 8521c5b4d61df2339e656c052853fce8d6b9c536 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Mar 7 13:42:56 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 8 09:33:51 2023 +0000 osl::Mutex->std::mutex in PackageManagerImpl Change-Id: I613a8846270f4b42125f24d9a7b99ecc12e2edb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index d4226aa6d4c4..570f8be23330 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -791,7 +791,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage( { OUString const id = dp_misc::getIdentifier( xPackage ); - ::osl::MutexGuard g(m_addMutex); + std::unique_lock g(m_addMutex); if (isInstalled(xPackage)) { //Do not guard the complete function with the getMutex diff --git a/desktop/source/deployment/manager/dp_manager.h b/desktop/source/deployment/manager/dp_manager.h index a2079da23adc..dce57d418e3f 100644 --- a/desktop/source/deployment/manager/dp_manager.h +++ b/desktop/source/deployment/manager/dp_manager.h @@ -27,6 +27,7 @@ #include <com/sun/star/deployment/XPackageRegistry.hpp> #include <com/sun/star/deployment/XPackageManager.hpp> #include <memory> +#include <mutex> #include <string_view> #include <utility> @@ -49,7 +50,7 @@ class PackageManagerImpl final : private cppu::BaseMutex, public t_pm_helper OUString m_activePackages_expanded; std::unique_ptr< ActivePackages > m_activePackagesDB; //This mutex is only used for synchronization in addPackage - ::osl::Mutex m_addMutex; + std::mutex m_addMutex; css::uno::Reference<css::ucb::XProgressHandler> m_xLogFile; inline void logIntern( css::uno::Any const & status ); void fireModified();