aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-01-17 15:42:36 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-02 08:10:30 +0100
commitf4c9823007c6819751c034ecb0110d10f02d4c73 (patch)
tree3fccc5c5abe39085071edb7e70bad71324e5ce07 /src/declarative/qml/v8
parent54c51c89e21800b3a455127b3c19a3c5b30ee319 (diff)
Remove QJSValue constructors that take QJSEngine argument
Rationale: These were remnants from QtScript. The difference from the standard constructors is that the value is eagerly bound to the engine, so they can be a bit faster. But they are also more low-level and look ugly in use. Task-number: QTBUG-23604 Change-Id: I5dae7452389383f60055d5ccc4f28d53c52f6092 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8')
-rw-r--r--src/declarative/qml/v8/qjsvalue.cpp116
-rw-r--r--src/declarative/qml/v8/qjsvalue.h12
2 files changed, 0 insertions, 128 deletions
diff --git a/src/declarative/qml/v8/qjsvalue.cpp b/src/declarative/qml/v8/qjsvalue.cpp
index 5387f843f0..ce0d122bad 100644
--- a/src/declarative/qml/v8/qjsvalue.cpp
+++ b/src/declarative/qml/v8/qjsvalue.cpp
@@ -189,122 +189,6 @@ QJSValue::QJSValue(QScriptPassPointer<QJSValuePrivate> d)
{
}
-#ifdef QT_DEPRECATED
-
-/*!
- \obsolete
-
- Constructs a new QJSValue with the boolean \a value and
- registers it with the script \a engine.
-*/
-QJSValue::QJSValue(QJSEngine* engine, bool value)
-{
- if (engine) {
- QScriptIsolate api(QV8Engine::get(engine), QScriptIsolate::NotNullEngine);
- d_ptr = new QJSValuePrivate(QV8Engine::get(engine), value);
- } else {
- d_ptr = new QJSValuePrivate(value);
- }
-}
-
-/*!
- \obsolete
-
- Constructs a new QJSValue with the integer \a value and
- registers it with the script \a engine.
-*/
-QJSValue::QJSValue(QJSEngine* engine, int value)
-{
- if (engine) {
- QScriptIsolate api(QV8Engine::get(engine), QScriptIsolate::NotNullEngine);
- d_ptr = new QJSValuePrivate(QV8Engine::get(engine), value);
- } else {
- d_ptr = new QJSValuePrivate(value);
- }
-}
-
-/*!
- \obsolete
-
- Constructs a new QJSValue with the unsigned integer \a value and
- registers it with the script \a engine.
- */
-QJSValue::QJSValue(QJSEngine* engine, uint value)
-{
- if (engine) {
- QScriptIsolate api(QV8Engine::get(engine), QScriptIsolate::NotNullEngine);
- d_ptr = new QJSValuePrivate(QV8Engine::get(engine), value);
- } else {
- d_ptr = new QJSValuePrivate(value);
- }
-}
-
-/*!
- \obsolete
-
- Constructs a new QJSValue with the double \a value and
- registers it with the script \a engine.
-*/
-QJSValue::QJSValue(QJSEngine* engine, double value)
-{
- if (engine) {
- QScriptIsolate api(QV8Engine::get(engine), QScriptIsolate::NotNullEngine);
- d_ptr = new QJSValuePrivate(QV8Engine::get(engine), value);
- } else {
- d_ptr = new QJSValuePrivate(value);
- }
-}
-
-/*!
- \obsolete
-
- Constructs a new QJSValue with the string \a value and
- registers it with the script \a engine.
-*/
-QJSValue::QJSValue(QJSEngine* engine, const QString& value)
-{
- if (engine) {
- QScriptIsolate api(QV8Engine::get(engine), QScriptIsolate::NotNullEngine);
- d_ptr = new QJSValuePrivate(QV8Engine::get(engine), value);
- } else {
- d_ptr = new QJSValuePrivate(value);
- }
-}
-
-/*!
- \obsolete
-
- Constructs a new QJSValue with the string \a value and
- registers it with the script \a engine.
-*/
-QJSValue::QJSValue(QJSEngine* engine, const char* value)
-{
- if (engine) {
- QScriptIsolate api(QV8Engine::get(engine), QScriptIsolate::NotNullEngine);
- d_ptr = new QJSValuePrivate(QV8Engine::get(engine), QString::fromUtf8(value));
- } else {
- d_ptr = new QJSValuePrivate(QString::fromUtf8(value));
- }
-}
-
-/*!
- \obsolete
-
- Constructs a new QJSValue with the special \a value and
- registers it with the script \a engine.
-*/
-QJSValue::QJSValue(QJSEngine* engine, SpecialValue value)
-{
- if (engine) {
- QScriptIsolate api(QV8Engine::get(engine), QScriptIsolate::NotNullEngine);
- d_ptr = new QJSValuePrivate(QV8Engine::get(engine), value);
- } else {
- d_ptr = new QJSValuePrivate(value);
- }
-}
-
-#endif // QT_DEPRECATED
-
/*!
Constructs a new QJSValue that is a copy of \a other.
diff --git a/src/declarative/qml/v8/qjsvalue.h b/src/declarative/qml/v8/qjsvalue.h
index 897ccb1e39..2cb32f9ba0 100644
--- a/src/declarative/qml/v8/qjsvalue.h
+++ b/src/declarative/qml/v8/qjsvalue.h
@@ -118,13 +118,6 @@ public:
QJSValue callAsConstructor(const QJSValueList &args = QJSValueList());
#ifdef QT_DEPRECATED
- QT_DEPRECATED QJSValue(QJSEngine *engine, SpecialValue val);
- QT_DEPRECATED QJSValue(QJSEngine *engine, bool val);
- QT_DEPRECATED QJSValue(QJSEngine *engine, int val);
- QT_DEPRECATED QJSValue(QJSEngine *engine, uint val);
- QT_DEPRECATED QJSValue(QJSEngine *engine, double val);
- QT_DEPRECATED QJSValue(QJSEngine *engine, const QString &val);
-
QT_DEPRECATED QJSEngine *engine() const;
QT_DEPRECATED bool isFunction() const;
@@ -139,11 +132,6 @@ public:
private:
// force compile error, prevent QJSValue(bool) to be called
QJSValue(void *);
-#ifdef QT_DEPRECATED
- // force compile error, prevent QJSValue(QScriptEngine*, bool) to be called
- QJSValue(QJSEngine *, void *);
- QJSValue(QJSEngine *, const char *);
-#endif
QJSValue(QJSValuePrivate*);
QJSValue(QScriptPassPointer<QJSValuePrivate>);