uic: use QString::compare in toBool
As a potential improvement discovered while working on QTBUG-98434, replace the current comparison in toBool with QString::compare. Task-number: QTBUG-103100 Change-Id: If5482adeea1537d24a97a4dda2d27ecc3b12b5bf Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>bb10
parent
e0c0feb1d8
commit
68d041d27d
|
|
@ -12,7 +12,7 @@
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
inline bool toBool(const QString &str)
|
||||
{ return str.toLower() == QLatin1StringView("true"); }
|
||||
{ return QString::compare(str, QLatin1StringView("true"), Qt::CaseInsensitive) == 0; }
|
||||
|
||||
inline QString toString(const DomString *str)
|
||||
{ return str ? str->text() : QString(); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue