summaryrefslogtreecommitdiffstats
path: root/src/pdf/qpdfdocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/qpdfdocument.cpp')
-rw-r--r--src/pdf/qpdfdocument.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp
index 7e0d5e0cc..8fd55dd57 100644
--- a/src/pdf/qpdfdocument.cpp
+++ b/src/pdf/qpdfdocument.cpp
@@ -51,20 +51,13 @@
QT_BEGIN_NAMESPACE
-// The library is not thread-safe at all, it has a lot of global variables.
-#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
-class QRecursiveMutex : public QMutex
-{
- QRecursiveMutex() : QMutex(Recursive) {}
-};
-#endif
Q_GLOBAL_STATIC(QRecursiveMutex, pdfMutex)
static int libraryRefCount;
static const double CharacterHitTolerance = 16.0;
Q_LOGGING_CATEGORY(qLcDoc, "qt.pdf.document")
QPdfMutexLocker::QPdfMutexLocker()
- : QMutexLocker(pdfMutex())
+ : std::unique_lock<QRecursiveMutex>(*pdfMutex())
{
}