Remove use of ::free from qlist.h
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 8 Aug 2012 12:44:51 +0000 (14:44 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 9 Aug 2012 01:26:05 +0000 (03:26 +0200)
commit649cd987439d87875c05983908823aa3062cdee9
tree76b32ac0b6e8e05069a11bfb42288c999b538559
parent1ecef1ea354c539ca57532a2944bcaa9842db500
Remove use of ::free from qlist.h

The memory is allocated in qlist.cpp, so it should be freed in
qlist.cpp. Freeing it in qlist.cpp ties our hands about future
improvements to the allocator.

In addition, silence the warning by the too-smart-for-its-own-good GCC
that we're trying to free a non-heap object:

  qlist.h:763:14: warning: attempt to free a non-heap object "QListData::shared_null" [-Wfree-nonheap-object]

The warning is wrong. It should say "possibly" somewhere because GCC
failed to account for all conditions in the path to free().

Change-Id: I34a6c16bba9a2197fc83eb3c7a63ae06fb25bf15
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/corelib/tools/qlist.cpp
src/corelib/tools/qlist.h