forked from qt-creator/qt-creator
ProjectExplorer: Fix soft assert in CustomParserSettings
Amends c15e09e0fe.
Change-Id: I73995f14cdb310cdffa9581efb388fe37c39229c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -86,9 +86,8 @@ CustomParserExpression::CustomParserChannel CustomParserExpression::channel() co
|
|||||||
|
|
||||||
void CustomParserExpression::setChannel(CustomParserExpression::CustomParserChannel channel)
|
void CustomParserExpression::setChannel(CustomParserExpression::CustomParserChannel channel)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(channel > ParseNoChannel && channel <= ParseBothChannels,
|
if (channel == ParseNoChannel || channel > ParseBothChannels)
|
||||||
channel = ParseBothChannels);
|
channel = ParseBothChannels;
|
||||||
|
|
||||||
m_channel = channel;
|
m_channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,10 +130,7 @@ void CustomParserExpression::fromMap(const QVariantMap &map)
|
|||||||
setFileNameCap(map.value(fileNameCapKey).toInt());
|
setFileNameCap(map.value(fileNameCapKey).toInt());
|
||||||
setLineNumberCap(map.value(lineNumberCapKey).toInt());
|
setLineNumberCap(map.value(lineNumberCapKey).toInt());
|
||||||
setExample(map.value(exampleKey).toString());
|
setExample(map.value(exampleKey).toString());
|
||||||
int channel = map.value(channelKey).toInt();
|
setChannel(static_cast<CustomParserChannel>(map.value(channelKey).toInt()));
|
||||||
if (channel == ParseNoChannel || channel > ParseBothChannels)
|
|
||||||
channel = ParseStdErrChannel;
|
|
||||||
setChannel(static_cast<CustomParserChannel>(channel));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CustomParserExpression::lineNumberCap() const
|
int CustomParserExpression::lineNumberCap() const
|
||||||
|
|||||||
Reference in New Issue
Block a user