summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptstring_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/qscriptstring_p.h')
-rw-r--r--src/script/api/qscriptstring_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/script/api/qscriptstring_p.h b/src/script/api/qscriptstring_p.h
index d3bb47d..8e344e8 100644
--- a/src/script/api/qscriptstring_p.h
+++ b/src/script/api/qscriptstring_p.h
@@ -77,6 +77,8 @@ public:
inline void detachFromEngine();
+ static inline bool isValid(const QScriptString &q);
+
QBasicAtomicInt ref;
QScriptEnginePrivate *engine;
JSC::Identifier identifier;
@@ -114,6 +116,11 @@ inline void QScriptStringPrivate::detachFromEngine()
identifier = JSC::Identifier();
}
+inline bool QScriptStringPrivate::isValid(const QScriptString &q)
+{
+ return (q.d_ptr && q.d_ptr->engine);
+}
+
QT_END_NAMESPACE
#endif