use normal mutex instead of recursivemutex

This commit is contained in:
Roy Qu 2023-03-12 10:00:32 +08:00
parent aaac2bfcf7
commit 16258cc015
2 changed files with 1 additions and 10 deletions

View File

@ -28,12 +28,7 @@
static QAtomicInt cppParserCount(0); static QAtomicInt cppParserCount(0);
CppParser::CppParser(QObject *parent) : QObject(parent), CppParser::CppParser(QObject *parent) : QObject(parent)
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
mMutex()
#else
mMutex(QMutex::Recursive)
#endif
{ {
mParserId = cppParserCount.fetchAndAddRelaxed(1); mParserId = cppParserCount.fetchAndAddRelaxed(1);
mLanguage = ParserLanguage::CPlusPlus; mLanguage = ParserLanguage::CPlusPlus;

View File

@ -692,11 +692,7 @@ private:
#ifdef QT_DEBUG #ifdef QT_DEBUG
int mLastIndex; int mLastIndex;
#endif #endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
QRecursiveMutex mMutex;
#else
QMutex mMutex; QMutex mMutex;
#endif
QMap<QString,KeywordType> mCppKeywords; QMap<QString,KeywordType> mCppKeywords;
QSet<QString> mCppTypeKeywords; QSet<QString> mCppTypeKeywords;
}; };