apol added inline comments.

INLINE COMMENTS

> kconfigloader.cpp:77
> +        case QXmlStreamReader::Characters:
> +            if (!reader.isWhitespace() && 
> !reader.text().toString().trimmed().isEmpty()) {
> +                if (!characters(reader.text()))

No need to construct a QString if it's just to check if it's empty.

> kconfigloader.cpp:106
> +            QString name = attrs.at(i).name().toString().toLower();
>              if (name == QLatin1String("name")) {
>                  //qDebug() << "set group to" << attrs.value(i);

This comparison doesn't need to be onto a converted QString. You can compare 
against the QStringRef and use QStringRef::compare to make it case insensitive.

> kconfigloader.cpp:140
> +            const QString name = attrs.at(i).name().toString().toLower();
>              if (name == QLatin1String("name")) {
> +                m_choice.name = attrs.at(i).value().toString();

Use QStringRef::compare()

> kconfigloader.cpp:194
> +    const QString tag = localName.toString().toLower();
>      if (tag == QLatin1String("entry")) {
>          addItem();

I'd also use QStringRef::compare here

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D26890

To: mlaurent, dfaure
Cc: apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

Reply via email to