summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine_p.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-09-01 20:05:57 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-09-02 08:01:00 (GMT)
commit0b5a81dd9aa153f6cd3a3929ee7ed82ca48f45a5 (patch)
tree872442f35c338ec989bcf60f8691d9c0cda2f420 /src/script/api/qscriptengine_p.h
parent7578f43d0f1358b2ed52b3a5d2b853f26e63aec0 (diff)
downloadQt-0b5a81dd9aa153f6cd3a3929ee7ed82ca48f45a5.zip
Qt-0b5a81dd9aa153f6cd3a3929ee7ed82ca48f45a5.tar.gz
Qt-0b5a81dd9aa153f6cd3a3929ee7ed82ca48f45a5.tar.bz2
Optimize QScriptClass
Do not convert JSC::Identifier to QString to convert it later to JSC::Identivier again Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/api/qscriptengine_p.h')
-rw-r--r--src/script/api/qscriptengine_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index f06f717..f8eee87 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -58,6 +58,7 @@
#include <QtCore/qhash.h>
#include <QtCore/qset.h>
#include "qscriptvalue_p.h"
+#include "qscriptstring_p.h"
#include "RefPtr.h"
#include "Structure.h"
@@ -122,6 +123,7 @@ public:
inline QScriptValue scriptValueFromJSCValue(JSC::JSValue value);
inline JSC::JSValue scriptValueToJSCValue(const QScriptValue &value);
+ inline QScriptString scriptStringFromJSCIdentifier(const JSC::Identifier &id);
QScriptValue scriptValueFromVariant(const QVariant &value);
QVariant scriptValueToVariant(const QScriptValue &value, int targetType);
@@ -362,6 +364,14 @@ inline QScriptValue QScriptValuePrivate::property(const QString &name, int resol
return property(JSC::Identifier(exec, name), resolveMode);
}
+inline QScriptString QScriptEnginePrivate::scriptStringFromJSCIdentifier(const JSC::Identifier &id)
+{
+ QScriptString q;
+ q.d_ptr = new QScriptStringPrivate(q_func(), id);
+ return q;
+}
+
+
QT_END_NAMESPACE
#endif