summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qstring.cpp')
-rw-r--r--src/corelib/text/qstring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 3e9deba29a..4d3f2016ac 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -2677,7 +2677,7 @@ QString &QString::append(const QString &str)
QString &QString::append(const QChar *str, int len)
{
if (str && len > 0) {
- if (d->isShared() || uint(d->size + len) + 1u > d->allocatedCapacity())
+ if (d->needsDetach() || uint(d->size + len) + 1u > d->allocatedCapacity())
reallocData(uint(d->size + len) + 1u, true);
memcpy(d->data() + d->size, str, len * sizeof(QChar));
d->size += len;