Support importing projects with project-name (#5456)

This commit is contained in:
Tomasz Edward Posluszny 2023-09-18 13:54:20 +02:00 committed by GitHub
parent 10c1ac977c
commit b6f60ad952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -1232,6 +1232,8 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti
temp.premiumArgs += std::string(" --") + child->GetText(); temp.premiumArgs += std::string(" --") + child->GetText();
} }
} }
else if (strcmp(node->Name(), CppcheckXml::ProjectNameElementName) == 0)
; // no-op
else { else {
printError("Unknown element '" + std::string(node->Name()) + "' in Cppcheck project file"); printError("Unknown element '" + std::string(node->Name()) + "' in Cppcheck project file");
return false; return false;

View File

@ -340,6 +340,7 @@ private:
" <exclude>\n" " <exclude>\n"
" <path name=\"gui/temp/\"/>\n" " <path name=\"gui/temp/\"/>\n"
" </exclude>\n" " </exclude>\n"
" <project-name>test test</project-name>\n"
"</project>\n"; "</project>\n";
std::istringstream istr(xml); std::istringstream istr(xml);
Settings s; Settings s;