QLoggingRegistry: allow Rules section to be lower case

In http://blog.qt.io/blog/2014/03/11/qt-weekly-1-categorized-logging/
the Rules section is given as:
[rules]
...

While in reality only Rules was accepted. Ignore casing instead.

Change-Id: Ibf0da6b6df857988d508ba9ec354cbce0b2c56d6
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Frederik Gladhorn 2015-07-30 15:34:49 +02:00
parent f8f357c0e9
commit 25981d9b7f

View File

@ -208,7 +208,7 @@ void QLoggingSettingsParser::setContent(QTextStream &stream)
continue;
}
if (_section == QLatin1String("Rules")) {
if (_section.toLower() == QLatin1String("rules")) {
int equalPos = line.indexOf(QLatin1Char('='));
if (equalPos != -1) {
if (line.lastIndexOf(QLatin1Char('=')) == equalPos) {