Use QRecursiveMutex instead of QMutex in CppParser
This commit is contained in:
parent
571f18ee54
commit
526e73d27a
|
@ -29,7 +29,12 @@
|
|||
|
||||
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);
|
||||
mLanguage = ParserLanguage::CPlusPlus;
|
||||
|
|
|
@ -713,7 +713,11 @@ private:
|
|||
#ifdef QT_DEBUG
|
||||
int mLastIndex;
|
||||
#endif
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
QRecursiveMutex mMutex;
|
||||
#else
|
||||
QMutex mMutex;
|
||||
#endif
|
||||
QMap<QString,KeywordType> mCppKeywords;
|
||||
QSet<QString> mCppTypeKeywords;
|
||||
};
|
||||
|
|
|
@ -861,7 +861,7 @@ int QSynEdit::charToColumn(const QString &s, int aChar) const
|
|||
|
||||
int QSynEdit::columnToChar(int aLine, int aColumn) const
|
||||
{
|
||||
Q_ASSERT( (aLine <= mDocument->count()) && (aLine >= 1));
|
||||
//Q_ASSERT( (aLine <= mDocument->count()) && (aLine >= 1));
|
||||
if (aLine <= mDocument->count()) {
|
||||
QString s = getDisplayStringAtLine(aLine);
|
||||
int x = 0;
|
||||
|
|
Loading…
Reference in New Issue