CustomParser: Remove upgrade path for legacy settings

... after converting the enum-based parser selection to
a string-based system. The upgrade path has been available
for four major Creator versions.

Introduced by 2ff642d8e4

Change-Id: I0c7ef9794f56d9a1a663cc4bd4a7eeacf3847834
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2018-03-07 18:23:26 +01:00
committed by André Hartmann
parent 10b5e8dc52
commit 3b9dfa2b96

View File

@@ -379,43 +379,8 @@ Core::Id CustomToolChain::outputParserId() const
return m_outputParserId;
}
static Core::Id convertLegacySettings(Core::Id parserId)
{
enum OutputParser
{
Gcc = 0,
Clang = 1,
LinuxIcc = 2,
Msvc = 3,
Custom = 4,
OutputParserCount
};
bool ok;
const OutputParser index = static_cast<OutputParser>(parserId.toString().toInt(&ok));
if (!ok)
return parserId;
switch (index) {
case Gcc:
return GccParser::id();
case Clang:
return ClangParser::id();
case LinuxIcc:
return LinuxIccParser::id();
case Msvc:
return HostOsInfo::isWindowsHost() ? MsvcParser::id() : CustomParser::id();
case Custom:
return CustomParser::id();
default:
return parserId;
}
}
void CustomToolChain::setOutputParserId(Core::Id parserId)
{
parserId = convertLegacySettings(parserId);
if (m_outputParserId == parserId)
return;
m_outputParserId = parserId;