CppTools: Move ProjectPart in its own header file

Also extracting inline HeaderPath class and change projects list in vector
because the size is  larger than a pointer.

Change-Id: I885fdff3fe9bccc877634d1615249755f5b674fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2016-01-13 14:12:15 +01:00
parent 42d570a3fe
commit 2b4cadf1fe
34 changed files with 532 additions and 372 deletions

View File

@@ -68,9 +68,9 @@ public:
{
QScopedPointer<CppSourceProcessor> sourceProcessor(
CppModelManager::createSourceProcessor());
const ProjectPart::HeaderPath hp(TestIncludePaths::directoryOfTestFile(),
ProjectPart::HeaderPath::IncludePath);
sourceProcessor->setHeaderPaths(ProjectPart::HeaderPaths() << hp);
const ProjectPartHeaderPath hp(TestIncludePaths::directoryOfTestFile(),
ProjectPartHeaderPath::IncludePath);
sourceProcessor->setHeaderPaths(ProjectPartHeaderPaths() << hp);
sourceProcessor->run(filePath);
Document::Ptr document = m_cmm->document(filePath);
@@ -212,9 +212,9 @@ void CppToolsPlugin::test_cppsourceprocessor_includeNext()
CppSourceProcessor::DocumentCallback documentCallback = [](const Document::Ptr &){};
CppSourceProcessor sourceProcessor(Snapshot(), documentCallback);
ProjectPart::HeaderPaths headerPaths = ProjectPart::HeaderPaths()
<< ProjectPart::HeaderPath(customHeaderPath, ProjectPart::HeaderPath::IncludePath)
<< ProjectPart::HeaderPath(systemHeaderPath, ProjectPart::HeaderPath::IncludePath);
ProjectPartHeaderPaths headerPaths = ProjectPartHeaderPaths()
<< ProjectPartHeaderPath(customHeaderPath, ProjectPartHeaderPath::IncludePath)
<< ProjectPartHeaderPath(systemHeaderPath, ProjectPartHeaderPath::IncludePath);
sourceProcessor.setHeaderPaths(headerPaths);
sourceProcessor.run(mainFilePath);