From cc359651ef95a06d4fe2e091cddaafd32e515a33 Mon Sep 17 00:00:00 2001 From: Cyano Hao Date: Thu, 9 May 2024 21:09:57 +0800 Subject: [PATCH] fix unexpected "int -> QChar -> QString" conversion (#417) --- RedPandaIDE/parser/parserutils.cpp | 6 ++++-- RedPandaIDE/utils/parsearg.cpp | 5 +++-- RedPandaIDE/widgets/bookmarkmodel.cpp | 2 +- libs/qsynedit/qsynedit/qsynedit.cpp | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/RedPandaIDE/parser/parserutils.cpp b/RedPandaIDE/parser/parserutils.cpp index 8a88b20b..ccc9f357 100644 --- a/RedPandaIDE/parser/parserutils.cpp +++ b/RedPandaIDE/parser/parserutils.cpp @@ -576,9 +576,11 @@ void CppScopes::addScope(int line, PStatement scopeStatement) scope->statement = scopeStatement; mScopes.append(scope); #ifdef QT_DEBUG - if (!mScopes.isEmpty() && mScopes.back()->startLine>line) { + if (!mScopes.isEmpty() && mScopes.back()->startLine > line) { qDebug()<fullName, line,mScopes.back()->startLine>line); + .arg(scopeStatement->fullName) + .arg(line) + .arg(mScopes.back()->startLine); } #endif } diff --git a/RedPandaIDE/utils/parsearg.cpp b/RedPandaIDE/utils/parsearg.cpp index 867e2023..5554e10f 100644 --- a/RedPandaIDE/utils/parsearg.cpp +++ b/RedPandaIDE/utils/parsearg.cpp @@ -238,7 +238,7 @@ QString variableExpansion(const QString &command, int &pos, const QMaptimestamp<=bookmark->timestamp) { - bookmark->description = pTemp->timestamp; + bookmark->description = pTemp->description; bookmark->timestamp = pTemp->timestamp; if (forProject == mIsForProject) emit dataChanged(createIndex(idx,2),createIndex(idx,2)); diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 8f2690c2..c1955219 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -3239,7 +3239,7 @@ void QSynEdit::recalcCharExtent() QString QSynEdit::expandAtWideGlyphs(const QString &S) { - QString Result(S.length()*2); // speed improvement + QString Result(S.length()*2, QChar(0)); // speed improvement int j = 0; for (int i=0;i