fix: function tips not correctly displayed
This commit is contained in:
parent
12153bf16a
commit
29ed064b91
|
@ -156,7 +156,7 @@ QList<PStatement> CppParser::getListOfFunctions(const QString &fileName, const Q
|
||||||
QStringList expression = splitExpression(phrase);
|
QStringList expression = splitExpression(phrase);
|
||||||
PStatement scopeStatement = doFindScopeStatement(fileName,line);
|
PStatement scopeStatement = doFindScopeStatement(fileName,line);
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
PEvalStatement evalStatement = doEvalExpression(fileName, expression, pos, scopeStatement, PEvalStatement(), false, true);
|
PEvalStatement evalStatement = doEvalExpression(fileName, expression, pos, scopeStatement, PEvalStatement(), true, true);
|
||||||
if (!evalStatement)
|
if (!evalStatement)
|
||||||
return result;
|
return result;
|
||||||
PStatement statement = evalStatement->baseStatement;
|
PStatement statement = evalStatement->baseStatement;
|
||||||
|
|
|
@ -803,18 +803,17 @@ void CppPreprocessor::removeGCCAttribute(const QString &line, QString &newLine,
|
||||||
|
|
||||||
void CppPreprocessor::openInclude(QString fileName)
|
void CppPreprocessor::openInclude(QString fileName)
|
||||||
{
|
{
|
||||||
fileName.squeeze();
|
|
||||||
|
|
||||||
PFileIncludes fileIncludes = getFileIncludesEntry(fileName);
|
PFileIncludes fileIncludes = getFileIncludesEntry(fileName);
|
||||||
if (fileIncludes) {
|
if (fileIncludes) {
|
||||||
fileName = fileIncludes->baseFile;
|
fileName = fileIncludes->baseFile;
|
||||||
} else {
|
} else {
|
||||||
fileName.squeeze();
|
fileName.squeeze();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIncludes.size()>0) {
|
if (mIncludes.size()>0) {
|
||||||
PParsedFile topFile = mIncludes.front();
|
PParsedFile topFile = mIncludes.front();
|
||||||
if (topFile->fileIncludes->includeFiles.contains(fileName)) {
|
if (topFile->fileIncludes->includeFiles.contains(fileName)) {
|
||||||
|
PParsedFile innerMostFile = mIncludes.back();
|
||||||
|
innerMostFile->fileIncludes->includeFiles.insert(fileName, false);
|
||||||
return; //already included
|
return; //already included
|
||||||
}
|
}
|
||||||
for (PParsedFile& parsedFile:mIncludes) {
|
for (PParsedFile& parsedFile:mIncludes) {
|
||||||
|
|
Loading…
Reference in New Issue