diff options
Diffstat (limited to 'src/declarative/qml/v8/qjsengine.h')
-rw-r--r-- | src/declarative/qml/v8/qjsengine.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/declarative/qml/v8/qjsengine.h b/src/declarative/qml/v8/qjsengine.h index a6c7ca7f5e..69f2f20b52 100644 --- a/src/declarative/qml/v8/qjsengine.h +++ b/src/declarative/qml/v8/qjsengine.h @@ -50,13 +50,15 @@ class Q_DECLARATIVE_EXPORT QJSEngine { Q_OBJECT public: +#ifdef QT_DEPRECATED enum ContextOwnership { AdoptCurrentContext, CreateNewContext }; + QT_DEPRECATED explicit QJSEngine(ContextOwnership ownership); +#endif QJSEngine(); - explicit QJSEngine(ContextOwnership ownership); explicit QJSEngine(QObject *parent); virtual ~QJSEngine(); @@ -64,22 +66,8 @@ public: QJSValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1); - bool hasUncaughtException() const; - QJSValue uncaughtException() const; - void clearExceptions(); - - QJSValue nullValue(); - QJSValue undefinedValue(); - - QJSValue newVariant(const QVariant &value); - - QJSValue newRegExp(const QRegExp ®exp); - QJSValue newObject(); QJSValue newArray(uint length = 0); - QJSValue newRegExp(const QString &pattern, const QString &flags); - QJSValue newDate(double value); - QJSValue newDate(const QDateTime &value); QJSValue newQObject(QObject *object); @@ -96,10 +84,27 @@ public: void collectGarbage(); - QJSValue toObject(const QJSValue &value); - QV8Engine *handle() const { return d; } +#ifdef QT_DEPRECATED + QT_DEPRECATED bool hasUncaughtException() const; + QT_DEPRECATED QJSValue uncaughtException() const; + QT_DEPRECATED void clearExceptions(); + + QT_DEPRECATED QJSValue nullValue(); + QT_DEPRECATED QJSValue undefinedValue(); + + QT_DEPRECATED QJSValue newVariant(const QVariant &value); + + QT_DEPRECATED QJSValue newRegExp(const QRegExp ®exp); + + QT_DEPRECATED QJSValue newRegExp(const QString &pattern, const QString &flags); + QT_DEPRECATED QJSValue newDate(double value); + QT_DEPRECATED QJSValue newDate(const QDateTime &value); + + QT_DEPRECATED QJSValue toObject(const QJSValue &value); +#endif + Q_SIGNALS: void signalHandlerException(const QJSValue &exception); |