From 0115713aefee66b451ba999bbaea1ffccf108136 Mon Sep 17 00:00:00 2001 From: Carlo Teubner Date: Sun, 2 Jun 2024 10:42:57 +0100 Subject: [PATCH] Make YubiKey::s_interfaceMutex non-recursive It does not need to be a recursive mutex, as per https://github.com/keepassxreboot/keepassxc/pull/7783#discussion_r1623274991. --- src/keys/drivers/YubiKey.cpp | 6 +----- src/keys/drivers/YubiKey.h | 12 +----------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/keys/drivers/YubiKey.cpp b/src/keys/drivers/YubiKey.cpp index 561c01181e..7dce9903b1 100644 --- a/src/keys/drivers/YubiKey.cpp +++ b/src/keys/drivers/YubiKey.cpp @@ -24,11 +24,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) -QRecursiveMutex YubiKey::s_interfaceMutex; -#else -QMutex YubiKey::s_interfaceMutex(QMutex::Recursive); -#endif +QMutex YubiKey::s_interfaceMutex; YubiKey::YubiKey() { diff --git a/src/keys/drivers/YubiKey.h b/src/keys/drivers/YubiKey.h index 729809472d..0edd4c8a70 100644 --- a/src/keys/drivers/YubiKey.h +++ b/src/keys/drivers/YubiKey.h @@ -21,15 +21,9 @@ #include #include +#include #include #include -#include - -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) -#include -#else -#include -#endif #include @@ -94,11 +88,7 @@ class YubiKey : public QObject bool m_initialized = false; QString m_error; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) - static QRecursiveMutex s_interfaceMutex; -#else static QMutex s_interfaceMutex; -#endif KeyMap m_usbKeys; KeyMap m_pcscKeys;