summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-07-31 12:24:05 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-31 14:11:47 (GMT)
commit701303d374b7da33166744d290ec4dbc789c7031 (patch)
tree0b94848e28c3e8a48ea498a19dbc998da6ec72e3 /src/script
parentbb1e71ac344b184d2ab13cd0ed7188eebb34aaf1 (diff)
downloadQt-701303d374b7da33166744d290ec4dbc789c7031.zip
Qt-701303d374b7da33166744d290ec4dbc789c7031.tar.gz
Qt-701303d374b7da33166744d290ec4dbc789c7031.tar.bz2
Move the declaration on some function into qscriptengine_p.h
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptcontext.cpp5
-rw-r--r--src/script/api/qscriptengine.cpp2
-rw-r--r--src/script/api/qscriptengine_p.h29
-rw-r--r--src/script/api/qscriptvalue.cpp7
-rw-r--r--src/script/api/qscriptvalueiterator.cpp6
-rw-r--r--src/script/bridge/qscriptclassobject.cpp4
-rw-r--r--src/script/bridge/qscriptqobject.cpp4
-rw-r--r--src/script/bridge/qscriptvariant.cpp3
8 files changed, 19 insertions, 41 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 4bdcc6a..178a8fb 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -162,11 +162,6 @@ QT_BEGIN_NAMESPACE
\value UnknownError An unknown error.
*/
-namespace QScript
-{
-JSC::UString qtStringToJSCUString(const QString &);
-}
-
QScriptContextPrivate::QScriptContextPrivate()
{
}
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 4fe8f76..92793a4 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -495,7 +495,7 @@ QScriptEnginePrivate *scriptEngineFromExec(JSC::ExecState *exec)
return static_cast<GlobalClientData*>(exec->globalData().clientData)->engine;
}
-bool isFunction(JSC::JSValue value)
+bool isFunction(const JSC::JSValue &value)
{
if (!value || !value.isObject())
return false;
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index ced49bb..c61e960 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -75,15 +75,6 @@ namespace JSC
class UString;
}
-namespace QScript
-{
- class QObjectPrototype;
- class QMetaObjectPrototype;
- class QVariantPrototype;
-#ifndef QT_NO_QOBJECT
- class QObjectData;
-#endif
-}
class QString;
class QStringList;
@@ -92,10 +83,26 @@ class QScriptValue;
class QScriptValuePrivate;
class QScriptTypeInfo;
class QScriptEngineAgent;
-
+class QScriptEnginePrivate;
class QScriptSyntaxCheckResult;
-
class QScriptEngine;
+
+namespace QScript
+{
+ class QObjectPrototype;
+ class QMetaObjectPrototype;
+ class QVariantPrototype;
+#ifndef QT_NO_QOBJECT
+ class QObjectData;
+#endif
+
+ //some conversion helper functions
+ JSC::UString qtStringToJSCUString(const QString &str);
+ QString qtStringFromJSCUString(const JSC::UString &str);
+ QScriptEnginePrivate *scriptEngineFromExec(JSC::ExecState *exec);
+ bool isFunction(const JSC::JSValue &value);
+}
+
class QScriptEnginePrivate
#ifndef QT_NO_QOBJECT
: public QObjectPrivate
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 2412c02..048d427 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -355,13 +355,6 @@ QScriptValuePrivate *QScriptValuePrivate::get(const QScriptValue &q)
return q.d_ptr;
}
-namespace QScript
-{
-JSC::UString qtStringToJSCUString(const QString &str);
-QString qtStringFromJSCUString(const JSC::UString &str);
-bool isFunction(JSC::JSValue value);
-}
-
QScriptValue QScriptValuePrivate::property(const QString &name, int resolveMode) const
{
QScriptEnginePrivate *eng_p = QScriptEnginePrivate::get(engine);
diff --git a/src/script/api/qscriptvalueiterator.cpp b/src/script/api/qscriptvalueiterator.cpp
index a7642b5..eaa84a4 100644
--- a/src/script/api/qscriptvalueiterator.cpp
+++ b/src/script/api/qscriptvalueiterator.cpp
@@ -93,12 +93,6 @@ QT_BEGIN_NAMESPACE
\sa QScriptValue::property()
*/
-namespace QScript
-{
-JSC::UString qtStringToJSCUString(const QString &str);
-QString qtStringFromJSCUString(const JSC::UString &str);
-}
-
class QScriptValueIteratorPrivate
{
public:
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp
index d07fa83..4913e73 100644
--- a/src/script/bridge/qscriptclassobject.cpp
+++ b/src/script/bridge/qscriptclassobject.cpp
@@ -62,10 +62,6 @@ QT_BEGIN_NAMESPACE
namespace QScript
{
-QString qtStringFromJSCUString(const JSC::UString &str);
-JSC::UString qtStringToJSCUString(const QString &str);
-QScriptEnginePrivate *scriptEngineFromExec(JSC::ExecState *exec);
-
ClassObjectDelegate::ClassObjectDelegate(QScriptClass *scriptClass)
: m_scriptClass(scriptClass)
{
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 9c15233..4e9b74b 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -243,10 +243,6 @@ static inline QScriptable *scriptableFromQObject(QObject *qobj)
return reinterpret_cast<QScriptable*>(ptr);
}
-JSC::UString qtStringToJSCUString(const QString &str);
-QString qtStringFromJSCUString(const JSC::UString &str);
-QScriptEnginePrivate *scriptEngineFromExec(JSC::ExecState *exec);
-
QtFunction::QtFunction(JSC::JSValue object, int initialIndex, bool maybeOverloaded,
JSC::JSGlobalData *data, WTF::PassRefPtr<JSC::Structure> sid,
const JSC::Identifier &ident)
diff --git a/src/script/bridge/qscriptvariant.cpp b/src/script/bridge/qscriptvariant.cpp
index a517fb3..f69a4ea 100644
--- a/src/script/bridge/qscriptvariant.cpp
+++ b/src/script/bridge/qscriptvariant.cpp
@@ -60,9 +60,6 @@ ASSERT_CLASS_FITS_IN_CELL(QScript::QVariantPrototype);
namespace QScript
{
-JSC::UString qtStringToJSCUString(const QString &str);
-QScriptEnginePrivate *scriptEngineFromExec(JSC::ExecState*);
-
QVariantDelegate::QVariantDelegate(const QVariant &value)
: m_value(value)
{