From 8528417ec1c064a3b8fd7fa24b1f3b193e668765 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Mon, 24 Aug 2009 10:20:02 +0200 Subject: Revert "Fix trivial QList detaching: QListData::detach2() *must* memcpy." This reverts commit 7a7ea0219f6ebb9f7833649ec76e077796be1843. --- src/corelib/tools/qlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(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; -- cgit v0.12