summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringiterator_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qstringiterator_p.h')
-rw-r--r--src/corelib/tools/qstringiterator_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringiterator_p.h b/src/corelib/tools/qstringiterator_p.h
index b80193b790..3f431daf6f 100644
--- a/src/corelib/tools/qstringiterator_p.h
+++ b/src/corelib/tools/qstringiterator_p.h
@@ -74,6 +74,11 @@ public:
return pos;
}
+ inline int index() const
+ {
+ return pos - i;
+ }
+
inline void setPosition(QString::const_iterator position)
{
Q_ASSERT_X(i <= position && position <= e, Q_FUNC_INFO, "position out of bounds");