summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-07 13:46:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-08 06:43:46 +0000
commit838036c304d474fc4c19e2fc59cadc6ba457c9ee (patch)
treedfee5bc5a0ad223a8c99b7dd0bb259378ef182fd /desktop
parent474f68e38b88ca6495cb7c5cc4038100c2786063 (diff)
osl::Mutex->std::mutex in UpdateRequiredDialog
Change-Id: Ic4161d946190f74d016dd81aca44a7623a4e2dcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx18
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx4
2 files changed, 11 insertions, 11 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 14fe03882ede..528d92fd5328 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1080,7 +1080,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCancelBtn, weld::Button&, void)
IMPL_LINK( UpdateRequiredDialog, 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 )
@@ -1106,7 +1106,7 @@ IMPL_LINK( UpdateRequiredDialog, startProgress, void*, _bLockInterface, void )
void UpdateRequiredDialog::showProgress( bool _bStart )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
bool bStart = _bStart;
@@ -1132,7 +1132,7 @@ void UpdateRequiredDialog::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();
}
@@ -1142,7 +1142,7 @@ void UpdateRequiredDialog::updateProgress( const tools::Long nProgress )
void UpdateRequiredDialog::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;
@@ -1172,7 +1172,7 @@ void UpdateRequiredDialog::updatePackageInfo( const uno::Reference< deployment::
IMPL_LINK_NOARG(UpdateRequiredDialog, HandleUpdateBtn, weld::Button&, void)
{
- ::osl::ClearableMutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
std::vector< uno::Reference< deployment::XPackage > > vUpdateEntries;
sal_Int32 nCount = m_xExtensionBox->GetEntryCount();
@@ -1183,7 +1183,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleUpdateBtn, weld::Button&, void)
vUpdateEntries.push_back( pEntry->m_xPackage );
}
- aGuard.clear();
+ aGuard.unlock();
m_pManager->getCmdQueue()->checkForUpdates( std::move(vUpdateEntries) );
}
@@ -1191,7 +1191,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleUpdateBtn, weld::Button&, void)
IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCloseBtn, weld::Button&, void)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
if ( !isBusy() )
{
@@ -1302,7 +1302,7 @@ bool UpdateRequiredDialog::checkDependencies( const uno::Reference< deployment::
bool UpdateRequiredDialog::hasActiveEntries()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
bool bRet = false;
tools::Long nCount = m_xExtensionBox->GetEntryCount();
@@ -1323,7 +1323,7 @@ bool UpdateRequiredDialog::hasActiveEntries()
void UpdateRequiredDialog::disableAllEntries()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
incBusy();
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 9be38f1d7571..8802997e2f20 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -25,7 +25,7 @@
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
-#include <osl/mutex.hxx>
+#include <mutex>
#include <rtl/ustring.hxx>
@@ -184,7 +184,7 @@ class UpdateRequiredDialog : public weld::GenericDialogController
{
const OUString m_sCloseText;
OUString m_sProgressText;
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
bool m_bHasProgress;
bool m_bProgressChanged;
bool m_bStartProgress;