diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 5bc11051..964d44eb 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -4113,8 +4113,8 @@ void CppParser::handleVar(const QString& typePrefix,bool isExtern,bool isStatic) // as // unsigned short bAppReturnCode,reserved,fBusy,fAck if (mIndex+1text) - && isIdentChar(mTokenizer[mIndex+1]->text.back()) + && isIdentChar(mTokenizer[mIndex+1]->text.front()) + && (isIdentChar(mTokenizer[mIndex+1]->text.back()) || isDigitChar(mTokenizer[mIndex+1]->text.back())) && addedVar && !(addedVar->properties & StatementProperty::spFunctionPointer) && AutoTypes.contains(addedVar->type)) { @@ -5875,6 +5875,7 @@ PStatement CppParser::doParseEvalTypeInfo( } else if (token == ">") { templateLevel--; } + baseType += token; } syntaxer.next(); } diff --git a/RedPandaIDE/widgets/codecompletionpopup.cpp b/RedPandaIDE/widgets/codecompletionpopup.cpp index 5f94f302..1d4ea023 100644 --- a/RedPandaIDE/widgets/codecompletionpopup.cpp +++ b/RedPandaIDE/widgets/codecompletionpopup.cpp @@ -781,8 +781,7 @@ void CodeCompletionPopup::getCompletionFor( if (!classTypeStatement) return; } else if (STLMaps.contains(parentScope->fullName)) { - QString typeName=mParser->findTemplateParamOf(fileName,ownerStatement->templateParams,1,parentScope); - // qDebug()<<"typeName"<baseStatement->type<baseStatement->command; + QString typeName="std::pair"; classTypeStatement=mParser->findTypeDefinitionOf(fileName, typeName,parentScope); if (!classTypeStatement) return;