CppTools: Move QtVersion and BuildTargetType

QtVersion to utils/cpplanguage_details.h which already contains similar
flags.

BuildTargetType to ProjectExplorer, next to BuildTargetInfo (but not in the
same header to not pull that in everywhere).

Removes dependency on ProjectPart from RawProjectPart.

Change-Id: I5791065e4266f20c2657ee4b1b594df04b238a1c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Eike Ziller
2019-08-28 13:04:16 +02:00
parent a0352f24d0
commit 8452264a18
27 changed files with 107 additions and 80 deletions

View File

@@ -148,23 +148,27 @@ QString Utils::toString(::Utils::LanguageExtensions languageExtension)
return result;
}
QString Utils::toString(ProjectPart::QtVersion qtVersion)
QString Utils::toString(::Utils::QtVersion qtVersion)
{
#define CASE_QTVERSION(x) case ProjectPart::x: return QLatin1String(#x)
#define CASE_QTVERSION(x) \
case ::Utils::QtVersion::x: \
return QLatin1String(#x)
switch (qtVersion) {
CASE_QTVERSION(UnknownQt);
CASE_QTVERSION(NoQt);
CASE_QTVERSION(Qt4);
CASE_QTVERSION(Qt5);
// no default to get a compiler warning if anything is added
CASE_QTVERSION(Unknown);
CASE_QTVERSION(None);
CASE_QTVERSION(Qt4);
CASE_QTVERSION(Qt5);
// no default to get a compiler warning if anything is added
}
#undef CASE_QTVERSION
return QString();
}
QString Utils::toString(ProjectPart::BuildTargetType buildTargetType)
QString Utils::toString(ProjectExplorer::BuildTargetType buildTargetType)
{
#define CASE_BUILDTARGETTYPE(x) case ProjectPart::x: return QLatin1String(#x)
#define CASE_BUILDTARGETTYPE(x) \
case ProjectExplorer::BuildTargetType::x: \
return QLatin1String(#x)
switch (buildTargetType) {
CASE_BUILDTARGETTYPE(Unknown);
CASE_BUILDTARGETTYPE(Executable);