QString: use new QL1S::at() in lastIndexOf()

Make overloaded lastIndexOf() functions
more homogeneous.

Change-Id: If45aac88b43d26baf7f93caec3662a1085e26b97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Anton Kudryavtsev 2016-06-08 14:43:58 +03:00
parent bdf270202b
commit 1c9818c871

View File

@ -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)