Add warning for malformed logging rule
Change-Id: I58ccbb77e5ab62e4114a271f199797dd1307a676 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
parent
0dd14aaaf1
commit
fa22138afd
@ -210,8 +210,8 @@ void QLoggingSettingsParser::setContent(QTextStream &stream)
|
||||
|
||||
if (_section == QLatin1String("Rules")) {
|
||||
int equalPos = line.indexOf(QLatin1Char('='));
|
||||
if ((equalPos != -1)
|
||||
&& (line.lastIndexOf(QLatin1Char('=')) == equalPos)) {
|
||||
if (equalPos != -1) {
|
||||
if (line.lastIndexOf(QLatin1Char('=')) == equalPos) {
|
||||
const QStringRef pattern = line.leftRef(equalPos);
|
||||
const QStringRef valueStr = line.midRef(equalPos + 1);
|
||||
int value = -1;
|
||||
@ -224,6 +224,9 @@ void QLoggingSettingsParser::setContent(QTextStream &stream)
|
||||
_rules.append(rule);
|
||||
else
|
||||
warnMsg("Ignoring malformed logging rule: '%s'", line.toUtf8().constData());
|
||||
} else {
|
||||
warnMsg("Ignoring malformed logging rule: '%s'", line.toUtf8().constData());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user