summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-08-24 08:20:02 (GMT)
committerHarald Fernengel <harald@trolltech.com>2009-08-24 08:31:30 (GMT)
commit8528417ec1c064a3b8fd7fa24b1f3b193e668765 (patch)
tree93ac65d647171c81a918fe28e4c4f3f5577d5c25 /src
parent648498dd839d88ea6ce9889eb71e16ac9a42e988 (diff)
downloadQt-8528417ec1c064a3b8fd7fa24b1f3b193e668765.zip
Qt-8528417ec1c064a3b8fd7fa24b1f3b193e668765.tar.gz
Qt-8528417ec1c064a3b8fd7fa24b1f3b193e668765.tar.bz2
Revert "Fix trivial QList detaching: QListData::detach2() *must* memcpy."
This reverts commit 7a7ea0219f6ebb9f7833649ec76e077796be1843.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qlist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 58406b9..d954160 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -94,6 +94,7 @@ QListData::Data *QListData::detach()
/*!
* Detaches the QListData by reallocating new memory.
* Returns the old (shared) data, it is up to the caller to deref() and free()
+ * For the new data node_copy needs to be called.
*
* \internal
*/
@@ -103,7 +104,6 @@ QListData::Data *QListData::detach2()
Data* t = static_cast<Data *>(qMalloc(DataHeaderSize + x->alloc * sizeof(void *)));
Q_CHECK_PTR(t);
- ::memcpy(t, x, DataHeaderSize + x->alloc * sizeof(void *));
t->ref = 1;
t->sharable = true;
t->alloc = x->alloc;