diff --git a/src/plugins/cpptools/compileroptionsbuilder_test.cpp b/src/plugins/cpptools/compileroptionsbuilder_test.cpp index 256cabe58fb..5f231a244c1 100644 --- a/src/plugins/cpptools/compileroptionsbuilder_test.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder_test.cpp @@ -47,7 +47,7 @@ namespace { class CompilerOptionsBuilderTest { public: - ProjectPart finalize() + const ProjectPart &finalize() { QFile pchFile(pchFileNativePath()); pchFile.open(QIODevice::WriteOnly); @@ -68,8 +68,8 @@ public: }; RawProjectPartFlags rppFlags; rppFlags.commandLineFlags = flags; - projectPart = ProjectPart::create({}, rpp, {}, {}, Utils::Language::Cxx, {}, rppFlags, - tcInfo); + projectPart = ProjectPart::create({}, rpp, {}, {}, Utils::Language::Cxx, languageExtensions, + rppFlags, tcInfo); compilerOptionsBuilder.emplace(CompilerOptionsBuilder(*projectPart)); return *projectPart; } diff --git a/src/plugins/cpptools/projectinfo_test.cpp b/src/plugins/cpptools/projectinfo_test.cpp index 69ba398a0ac..0f1d4f18d13 100644 --- a/src/plugins/cpptools/projectinfo_test.cpp +++ b/src/plugins/cpptools/projectinfo_test.cpp @@ -186,7 +186,7 @@ void CppToolsPlugin::test_projectPartChooser_forMultiplePreferSelectedForBuildin RawProjectPart rpp1; rpp1.setSelectedForBuilding(false); RawProjectPart rpp2; - rpp1.setSelectedForBuilding(true); + rpp2.setSelectedForBuilding(true); const ProjectPart::Ptr firstProjectPart = ProjectPart::create({}, rpp1); const ProjectPart::Ptr secondProjectPart = ProjectPart::create({}, rpp2); ProjectPartChooserTest t; @@ -498,7 +498,7 @@ namespace { class HeaderPathFilterTest { public: - ProjectPart finalize() + const ProjectPart &finalize() { RawProjectPart rpp; rpp.setHeaderPaths(headerPaths); @@ -574,6 +574,7 @@ void CppToolsPlugin::test_headerPathFilter_system() void CppToolsPlugin::test_headerPathFilter_user() { HeaderPathFilterTest t; + t.finalize(); t.filter->process(); QCOMPARE(t.filter->userHeaderPaths, (HeaderPaths{t.user("/build/user_path"),