forked from qt-creator/qt-creator
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:
committed by
André Hartmann
parent
10b5e8dc52
commit
3b9dfa2b96
@@ -379,43 +379,8 @@ Core::Id CustomToolChain::outputParserId() const
|
|||||||
return m_outputParserId;
|
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)
|
void CustomToolChain::setOutputParserId(Core::Id parserId)
|
||||||
{
|
{
|
||||||
parserId = convertLegacySettings(parserId);
|
|
||||||
|
|
||||||
if (m_outputParserId == parserId)
|
if (m_outputParserId == parserId)
|
||||||
return;
|
return;
|
||||||
m_outputParserId = parserId;
|
m_outputParserId = parserId;
|
||||||
|
|||||||
Reference in New Issue
Block a user