summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2020-05-11 12:38:38 -0700
committerThiago Macieira <thiago.macieira@intel.com>2020-05-20 01:41:01 -0700
commit40375aff3e7f5d4a9ef8725ce4ca54954bd74540 (patch)
tree86f91539deb22030a730a8252cd9ccd0218c5866
parent57ae490b073ea14a9e7b3439031040515237eeb6 (diff)
Add compatibility for Qt 6's QRecursiveMutex class
Change-Id: I95cbf65aab73453688b6fffd160e1091d7713d85 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/pdf/qpdfdocument.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp
index e4ec363ce..e5d981c0a 100644
--- a/src/pdf/qpdfdocument.cpp
+++ b/src/pdf/qpdfdocument.cpp
@@ -52,7 +52,13 @@
QT_BEGIN_NAMESPACE
// The library is not thread-safe at all, it has a lot of global variables.
-Q_GLOBAL_STATIC_WITH_ARGS(QMutex, pdfMutex, (QMutex::Recursive));
+#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")