diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-27 15:37:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-27 16:04:03 +0000 |
commit | 46becac127859a742e1f702bcde718304efcde69 (patch) | |
tree | fcd43141b1a4c781aae575b2648af12229ac51a2 /framework | |
parent | 943b58c9577c4e43c04fb2df81203af3fd0da433 (diff) |
AcceleratorCache does not need to lock the SolarMutex
it is only used by the *AccelerationConfiguration classes, and they lock
the SolarMutex around all accesses to this data.
Change-Id: I07de415bae9e0aff679f693022b9181971f19bd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146254
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/accelerators/acceleratorcache.cxx | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/framework/source/accelerators/acceleratorcache.cxx b/framework/source/accelerators/acceleratorcache.cxx index 98596a895036..342b9701f99d 100644 --- a/framework/source/accelerators/acceleratorcache.cxx +++ b/framework/source/accelerators/acceleratorcache.cxx @@ -27,19 +27,16 @@ namespace framework { bool AcceleratorCache::hasKey(const css::awt::KeyEvent& aKey) const { - SolarMutexGuard g; return (m_lKey2Commands.find(aKey) != m_lKey2Commands.end()); } bool AcceleratorCache::hasCommand(const OUString& sCommand) const { - SolarMutexGuard g; return (m_lCommand2Keys.find(sCommand) != m_lCommand2Keys.end()); } AcceleratorCache::TKeyList AcceleratorCache::getAllKeys() const { - SolarMutexGuard g; TKeyList lKeys; lKeys.reserve(m_lKey2Commands.size()); @@ -53,8 +50,6 @@ AcceleratorCache::TKeyList AcceleratorCache::getAllKeys() const void AcceleratorCache::setKeyCommandPair(const css::awt::KeyEvent& aKey, const OUString& sCommand) { - SolarMutexGuard g; - // register command for the specified key m_lKey2Commands[aKey] = sCommand; @@ -65,7 +60,6 @@ void AcceleratorCache::setKeyCommandPair(const css::awt::KeyEvent& aKey, const O AcceleratorCache::TKeyList AcceleratorCache::getKeysByCommand(const OUString& sCommand) const { - SolarMutexGuard g; TCommand2Keys::const_iterator pCommand = m_lCommand2Keys.find(sCommand); if (pCommand == m_lCommand2Keys.end()) throw css::container::NoSuchElementException(); @@ -74,7 +68,6 @@ AcceleratorCache::TKeyList AcceleratorCache::getKeysByCommand(const OUString& sC OUString AcceleratorCache::getCommandByKey(const css::awt::KeyEvent& aKey) const { - SolarMutexGuard g; TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey); if (pKey == m_lKey2Commands.end()) throw css::container::NoSuchElementException(); @@ -83,8 +76,6 @@ OUString AcceleratorCache::getCommandByKey(const css::awt::KeyEvent& aKey) const void AcceleratorCache::removeKey(const css::awt::KeyEvent& aKey) { - SolarMutexGuard g; - // check if key exists TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey); if (pKey == m_lKey2Commands.end()) @@ -105,8 +96,6 @@ void AcceleratorCache::removeKey(const css::awt::KeyEvent& aKey) void AcceleratorCache::removeCommand(const OUString& sCommand) { - SolarMutexGuard g; - const TKeyList& lKeys = getKeysByCommand(sCommand); for (auto const& lKey : lKeys) { |