summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/text/qbytearray.h2
-rw-r--r--src/corelib/text/qstring.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h
index 4251e6e20e..b5278dbba9 100644
--- a/src/corelib/text/qbytearray.h
+++ b/src/corelib/text/qbytearray.h
@@ -167,7 +167,7 @@ public:
[[nodiscard]] QByteArray last(qsizetype n) const &
{ verify(0, n); return sliced(size() - n, n); }
[[nodiscard]] QByteArray sliced(qsizetype pos) const &
- { verify(pos, 0); return QByteArray(data() + pos, size() - pos); }
+ { verify(pos, 0); return sliced(pos, size() - pos); }
[[nodiscard]] QByteArray sliced(qsizetype pos, qsizetype n) const &
{ verify(pos, n); return QByteArray(d.data() + pos, n); }
[[nodiscard]] QByteArray chopped(qsizetype len) const &
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h
index e2f5d99d90..411430a189 100644
--- a/src/corelib/text/qstring.h
+++ b/src/corelib/text/qstring.h
@@ -347,7 +347,7 @@ public:
[[nodiscard]] QString last(qsizetype n) const &
{ verify(0, n); return sliced(size() - n, n); }
[[nodiscard]] QString sliced(qsizetype pos) const &
- { verify(pos, 0); return QString(data() + pos, size() - pos); }
+ { verify(pos, 0); return sliced(pos, size() - pos); }
[[nodiscard]] QString sliced(qsizetype pos, qsizetype n) const &
{ verify(pos, n); return QString(begin() + pos, n); }
[[nodiscard]] QString chopped(qsizetype n) const &