From 16258cc0159a4dd5cbb5c038d5c6ef95b032a34d Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 12 Mar 2023 10:00:32 +0800 Subject: [PATCH] use normal mutex instead of recursivemutex --- RedPandaIDE/parser/cppparser.cpp | 7 +------ RedPandaIDE/parser/cppparser.h | 4 ---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index f7b180c4..3c5feb69 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -28,12 +28,7 @@ static QAtomicInt cppParserCount(0); -CppParser::CppParser(QObject *parent) : QObject(parent), -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - mMutex() -#else - mMutex(QMutex::Recursive) -#endif +CppParser::CppParser(QObject *parent) : QObject(parent) { mParserId = cppParserCount.fetchAndAddRelaxed(1); mLanguage = ParserLanguage::CPlusPlus; diff --git a/RedPandaIDE/parser/cppparser.h b/RedPandaIDE/parser/cppparser.h index d3cdd685..9f81a57a 100644 --- a/RedPandaIDE/parser/cppparser.h +++ b/RedPandaIDE/parser/cppparser.h @@ -692,11 +692,7 @@ private: #ifdef QT_DEBUG int mLastIndex; #endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - QRecursiveMutex mMutex; -#else QMutex mMutex; -#endif QMap mCppKeywords; QSet mCppTypeKeywords; };