Use case-insensitive compare more
... to avoid allocations. Change-Id: I5993633d1509495ff6ce3a11274a53504aac7c5e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
cea75a2a65
commit
ff259bffe6
@ -215,7 +215,7 @@ void QLoggingSettingsParser::setContent(QTextStream &stream)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_section.toLower() == QLatin1String("rules")) {
|
if (_section.compare(QLatin1String("rules"), Qt::CaseInsensitive) == 0) {
|
||||||
int equalPos = line.indexOf(QLatin1Char('='));
|
int equalPos = line.indexOf(QLatin1Char('='));
|
||||||
if (equalPos != -1) {
|
if (equalPos != -1) {
|
||||||
if (line.lastIndexOf(QLatin1Char('=')) == equalPos) {
|
if (line.lastIndexOf(QLatin1Char('=')) == equalPos) {
|
||||||
|
@ -2748,7 +2748,7 @@ bool Parser::testAndParseUri(QString *uri)
|
|||||||
index = rewind;
|
index = rewind;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (name.toLower() != QLatin1String("url")) {
|
if (name.compare(QLatin1String("url"), Qt::CaseInsensitive) != 0) {
|
||||||
index = rewind;
|
index = rewind;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -574,7 +574,7 @@ static void _q_parseDosDir(const QStringList &tokens, const QString &userName, Q
|
|||||||
|
|
||||||
QString name = tokens.at(3);
|
QString name = tokens.at(3);
|
||||||
info->setName(name);
|
info->setName(name);
|
||||||
info->setSymLink(name.toLower().endsWith(QLatin1String(".lnk")));
|
info->setSymLink(name.endsWith(QLatin1String(".lnk"), Qt::CaseInsensitive));
|
||||||
|
|
||||||
if (tokens.at(2) == QLatin1String("<DIR>")) {
|
if (tokens.at(2) == QLatin1String("<DIR>")) {
|
||||||
info->setFile(false);
|
info->setFile(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user