From 1c9818c87173f49e5b10db40776e0c0ae32008fd Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 8 Jun 2016 14:43:58 +0300 Subject: QString: use new QL1S::at() in lastIndexOf() Make overloaded lastIndexOf() functions more homogeneous. Change-Id: If45aac88b43d26baf7f93caec3662a1085e26b97 Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne --- src/corelib/tools/qstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index f49ae28e76..6c1ee25234 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3268,7 +3268,7 @@ int QString::lastIndexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) co { const int sl = str.size(); if (sl == 1) - return lastIndexOf(QLatin1Char(str.latin1()[0]), from, cs); + return lastIndexOf(str.at(0), from, cs); const int l = d->size; if (from < 0) @@ -9798,7 +9798,7 @@ int QStringRef::lastIndexOf(QLatin1String str, int from, Qt::CaseSensitivity cs) { const int sl = str.size(); if (sl == 1) - return lastIndexOf(QLatin1Char(str.latin1()[0]), from, cs); + return lastIndexOf(str.at(0), from, cs); const int l = size(); if (from < 0) -- cgit v1.2.3