summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringiterator_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-11-02 16:06:49 -0500
committerThiago Macieira <thiago.macieira@intel.com>2015-11-18 00:30:40 +0000
commitf29b6943f0a3b535309a383c41711de05f22eb54 (patch)
tree804d1cd4a3e31797e81481ddff382ff53c863701 /src/corelib/tools/qstringiterator_p.h
parent7c05a0cc9904e7a42c20e0b7751082f7f812e28d (diff)
QString: Fix in-place toUpper/Lower when there's size expansion
When that happens, we need to detach (in-place conversion won't work), so we recurse back into the same function, but the template version that does detaching. Task-number: QTBUG-49181 Change-Id: Idba8c29717f34c70a58fffff1412fea3acc95f98 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qstringiterator_p.h')
-rw-r--r--src/corelib/tools/qstringiterator_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringiterator_p.h b/src/corelib/tools/qstringiterator_p.h
index 06b05de833..1c098a314d 100644
--- a/src/corelib/tools/qstringiterator_p.h
+++ b/src/corelib/tools/qstringiterator_p.h
@@ -69,6 +69,13 @@ public:
{
}
+ inline explicit QStringIterator(const QChar *begin, int idx, const QChar *end)
+ : i(begin),
+ pos(begin + idx),
+ e(end)
+ {
+ }
+
inline QString::const_iterator position() const
{
return pos;