CppTools: Refactor ProjectPartBuilder

...and add some basic tests.

Introduce the abstractions ProjectInterface and ToolChainInterface in
order to break the dependency to the ProjectExplorer. Also, some simple
logic can go there to simplify the (Base)ProjectPartBuilder.

Change-Id: I6c50a1804ce62098b87109931eb171f5c2542937
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-12-05 15:24:09 +01:00
parent 95fa59dd6c
commit 602ad72d42
20 changed files with 925 additions and 320 deletions

View File

@@ -1,7 +1,11 @@
# Currently there are no tests for the project explorer plugin, but we include
# headers from it that needs to have the export/import adapted for Windows.
contains(CONFIG, dll) {
DEFINES += CPPTOOLS_LIBRARY
DEFINES += PROJECTEXPLORER_LIBRARY
} else {
DEFINES += CPPTOOLS_STATIC_LIBRARY
DEFINES += PROJECTEXPLORER_STATIC_LIBRARY
}
HEADERS += \
@@ -9,11 +13,17 @@ HEADERS += \
$$PWD/senddocumenttracker.h \
$$PWD/projectpart.h \
$$PWD/compileroptionsbuilder.h \
$$PWD/cppprojectfilecategorizer.h
$$PWD/cppprojectfilecategorizer.h \
$$PWD/cppbaseprojectpartbuilder.h \
$$PWD/projectinfo.h \
$$PWD/cppprojectinterface.h \
SOURCES += \
$$PWD/cppprojectfile.cpp \
$$PWD/senddocumenttracker.cpp \
$$PWD/projectpart.cpp \
$$PWD/compileroptionsbuilder.cpp \
$$PWD/cppprojectfilecategorizer.cpp
$$PWD/cppprojectfilecategorizer.cpp \
$$PWD/cppbaseprojectpartbuilder.cpp \
$$PWD/projectinfo.cpp \