From b6f60ad9522000b991ba19b0d8e7a296f55b19eb Mon Sep 17 00:00:00 2001 From: Tomasz Edward Posluszny Date: Mon, 18 Sep 2023 13:54:20 +0200 Subject: [PATCH] Support importing projects with project-name (#5456) --- lib/importproject.cpp | 2 ++ test/testimportproject.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/importproject.cpp b/lib/importproject.cpp index f7d20d132..571676520 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -1232,6 +1232,8 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings *setti temp.premiumArgs += std::string(" --") + child->GetText(); } } + else if (strcmp(node->Name(), CppcheckXml::ProjectNameElementName) == 0) + ; // no-op else { printError("Unknown element '" + std::string(node->Name()) + "' in Cppcheck project file"); return false; diff --git a/test/testimportproject.cpp b/test/testimportproject.cpp index e01457ff2..9e5709437 100644 --- a/test/testimportproject.cpp +++ b/test/testimportproject.cpp @@ -340,6 +340,7 @@ private: " \n" " \n" " \n" + " test test\n" "\n"; std::istringstream istr(xml); Settings s;