summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qlist.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 3f621e71fb..f93b60d4bb 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -528,6 +528,9 @@ inline void QList<T>::squeeze()
detached->copyAppend(constBegin(), constEnd());
}
d.swap(detached);
+ } else {
+ // We're detached so this is fine
+ d->clearFlag(Data::CapacityReserved);
}
}