summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-06-08 14:43:58 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-06-09 18:01:50 +0000
commit1c9818c87173f49e5b10db40776e0c0ae32008fd (patch)
tree8541adbd4c4c233612144dee610248b836fef6cd /src
parentbdf270202b39a79770b21ffbdc075eccd3676128 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qstring.cpp4
1 files changed, 2 insertions, 2 deletions
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)