- fix: ctrl+click on the enum value will jump to the wrong line in it's definition file

- fix: line info in the mouse tip of statement not correct
This commit is contained in:
Roy Qu 2022-01-22 21:07:41 +08:00
parent c595b6e9da
commit df323d30c8
3 changed files with 7 additions and 8 deletions

View File

@ -9,6 +9,8 @@ Red Panda C++ Version 0.13.3
- fix: app will become very slow when processing very long lines.
- enhancement: If console pauser doesn't exist, warn and stop running programs.
- fix: app crash when ctrl+click on a #include statement that point to a directory instead of header file.
- fix: ctrl+click on the enum value will jump to the wrong line in it's definition file
- fix: line info in the mouse tip of statement not correct
Red Panda C++ Version 0.13.2
- fix: "delete and exit" button in the environtment / folder option page doesn't work correctly

View File

@ -3116,7 +3116,7 @@ QString Editor::getParserHint(const QStringList& expression,const QString &s, in
} else if (statement->line>0) {
QFileInfo fileInfo(statement->fileName);
result = mParser->prettyPrintStatement(statement,mFilename, line) + " - "
+ QString("%1(%2) ").arg(fileInfo.fileName()).arg(line)
+ QString("%1(%2) ").arg(fileInfo.fileName()).arg(statement->line)
+ tr("Ctrl+click for more info");
} else { // hard defines
result = mParser->prettyPrintStatement(statement, mFilename);
@ -3170,7 +3170,7 @@ QString Editor::getHintForFunction(const PStatement &statement, const PStatement
result += "<BR />";
QFileInfo fileInfo(childStatement->fileName);
result = mParser->prettyPrintStatement(childStatement,filename,line) + " - "
+ QString("%1(%2) ").arg(fileInfo.fileName()).arg(line)
+ QString("%1(%2) ").arg(fileInfo.fileName()).arg(childStatement->line)
+ tr("Ctrl+click for more info");
}
}

View File

@ -1974,8 +1974,7 @@ void CppParser::handleEnum()
cmd,
args,
"",
//mTokenizer[mIndex]^.Line,
startLine,
mTokenizer[mIndex]->line,
StatementKind::skEnum,
getScope(),
mClassScope,
@ -1992,8 +1991,7 @@ void CppParser::handleEnum()
cmd,
args,
"",
//mTokenizer[mIndex]^.Line,
startLine,
mTokenizer[mIndex]->line,
StatementKind::skEnum,
getScope(),
mClassScope,
@ -2008,8 +2006,7 @@ void CppParser::handleEnum()
cmd,
args,
"",
//mTokenizer[mIndex]^.Line,
startLine,
mTokenizer[mIndex]->line,
StatementKind::skEnum,
getScope(),
mClassScope,