summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorRobin Burchell <robin+qt@viroteck.net>2012-03-22 21:44:13 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-31 16:46:40 +0200
commit47728445a5e7317ed2123a8824c54a012eeee142 (patch)
tree762385979cf489c0cb92a061ed7bde3cd077c851 /tests/auto/testlib
parentad921347f701ea7f732633c9c584be9300317537 (diff)
Remove all calls to, and deprecate qMalloc, qRealloc and qFree.
Callers should just call the standard allocation functions directly. Adding an extra function call onto all basic memory management for the sake of making it instrumentable in rare cases isn't really fair to everyone else. What's more, this wasn't completely reliable, as not everything was using them in a number of places. Memory management can still be overridden using tricks like LD_PRELOAD if needed. Their aligned equivilents cannot be deprecated, as no standard equivilents exist, although investigation into posix_memalign(3) is a possibility for the future. Change-Id: Ic5f74b14be33f8bc188fe7236c55e15c36a23fc7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/badxml/tst_badxml.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
index 2fb9e5ea90..8c75602842 100644
--- a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
+++ b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
@@ -76,7 +76,7 @@ class tst_BadXmlSub : public tst_BadXml
public:
tst_BadXmlSub()
: className("tst_BadXml"), mo(0) {}
- ~tst_BadXmlSub() { qFree(mo); }
+ ~tst_BadXmlSub() { free(mo); }
const QMetaObject* metaObject() const;
@@ -88,7 +88,7 @@ private:
const QMetaObject* tst_BadXmlSub::metaObject() const
{
if (!mo || (mo->className() != className)) {
- qFree(mo);
+ free(mo);
QMetaObjectBuilder builder(&EmptyClass::staticMetaObject);
builder.setClassName(className);
const_cast<tst_BadXmlSub *>(this)->mo = builder.toMetaObject();