From d8a35398444a076d0435b9440b0e58f16fdb8a05 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Mon, 20 Jun 2022 09:53:28 +0200 Subject: [PATCH] bugfix: didn't compile with Qt < 6.0 --- lib/jkqtmathtext/jkqtmathtext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/jkqtmathtext/jkqtmathtext.cpp b/lib/jkqtmathtext/jkqtmathtext.cpp index ba7be4a7b7..bc494a7fdb 100644 --- a/lib/jkqtmathtext/jkqtmathtext.cpp +++ b/lib/jkqtmathtext/jkqtmathtext.cpp @@ -1225,7 +1225,8 @@ JKQTMathTextNode* JKQTMathText::parseLatexString(bool get, JKQTMathTextBraceType if (currentToken==MTTtext) { if (currentTokenName.size()>0) { bool tokenWasNoBrace=false; - if (TokenNameMatchesJKQTMathTextBraceType(currentTokenName[0], quitOnClosingBrace, true, &tokenWasNoBrace)) { + const QString firstTokenChar(currentTokenName[0]); + if (TokenNameMatchesJKQTMathTextBraceType(firstTokenChar, quitOnClosingBrace, true, &tokenWasNoBrace)) { //std::cout<<"found \\right '"<0) { - const JKQTMathTextBraceType bracetype=TokenName2JKQTMathTextBraceType(currentTokenName[0]); + const QString firstTokenChar(currentTokenName[0]); + const JKQTMathTextBraceType bracetype=TokenName2JKQTMathTextBraceType(firstTokenChar); if (bracetype==MTBTNone) { currentTokenName=currentTokenName.right(currentTokenName.size()-1); JKQTMathTextNode* cn=parseLatexString(currentTokenName.size()<=0, MTBTAny);