summaryrefslogtreecommitdiff
path: root/src/script/api
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-04-30 14:54:56 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-30 15:15:34 +0200
commit8879cbba5915a60ed8b655169cfc8068802499bb (patch)
treee51c42b8ca4e0eb30e4f48675819213b2e36de38 /src/script/api
parentff41368749e3534cddc534ab58a891b2c07ce02f (diff)
downloadqtscript-8879cbba5915a60ed8b655169cfc8068802499bb.tar.gz
Fix some deprecation warnings in QtScript.
Change-Id: I98d4826fcc2e3687d45edfccca956891ca0466cf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/qscriptengine.cpp4
-rw-r--r--src/script/api/qscriptengine_p.h10
2 files changed, 9 insertions, 5 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index f3c63ba..c14f3ce 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -78,6 +78,8 @@
#include "qscriptextensioninterface.h"
#endif
+#include <stdlib.h>
+
Q_DECLARE_METATYPE(QScriptValue)
#ifndef QT_NO_QOBJECT
Q_DECLARE_METATYPE(QObjectList)
@@ -1035,7 +1037,7 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
while (freeScriptValues) {
QScriptValuePrivate *p = freeScriptValues;
freeScriptValues = p->next;
- qFree(p);
+ free(p);
}
}
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index e41c5d5..526fb1d 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -67,6 +67,8 @@
#include "JSGlobalObject.h"
#include "JSValue.h"
+#include <stdlib.h>
+
namespace JSC
{
class EvalExecutable;
@@ -595,7 +597,7 @@ inline QScriptValuePrivate *QScriptEnginePrivate::allocateScriptValuePrivate(siz
--freeScriptValuesCount;
return p;
}
- return reinterpret_cast<QScriptValuePrivate*>(qMalloc(size));
+ return reinterpret_cast<QScriptValuePrivate*>(malloc(size));
}
inline void QScriptEnginePrivate::freeScriptValuePrivate(QScriptValuePrivate *p)
@@ -605,7 +607,7 @@ inline void QScriptEnginePrivate::freeScriptValuePrivate(QScriptValuePrivate *p)
freeScriptValues = p;
++freeScriptValuesCount;
} else {
- qFree(p);
+ free(p);
}
}
@@ -794,7 +796,7 @@ inline void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate
{
if (engine)
return engine->allocateScriptValuePrivate(size);
- return qMalloc(size);
+ return malloc(size);
}
inline void QScriptValuePrivate::operator delete(void *ptr)
@@ -803,7 +805,7 @@ inline void QScriptValuePrivate::operator delete(void *ptr)
if (d->engine)
d->engine->freeScriptValuePrivate(d);
else
- qFree(d);
+ free(d);
}
inline void QScriptEnginePrivate::saveException(JSC::ExecState *exec, JSC::JSValue *val)