summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptvalue_p.h
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-08-19 14:26:58 (GMT)
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-08-19 14:26:58 (GMT)
commit7ae701ff4759bdfd12953c6f4d785c2d9241690f (patch)
tree7788e1119d5f5b3e620eb1b8e2a793ee6c828c8e /src/script/api/qscriptvalue_p.h
parentbbf514474b2664779229b919b54b4c541157c1d3 (diff)
downloadQt-7ae701ff4759bdfd12953c6f4d785c2d9241690f.zip
Qt-7ae701ff4759bdfd12953c6f4d785c2d9241690f.tar.gz
Qt-7ae701ff4759bdfd12953c6f4d785c2d9241690f.tar.bz2
Fix QScriptValue::objectId().
QScriptValue id were made persistent. It depands on JSC:JSValue JSCell pointer not on QScriptValuePrivate attr. Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/api/qscriptvalue_p.h')
-rw-r--r--src/script/api/qscriptvalue_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 43d48f3..7c1d538 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -148,6 +148,14 @@ public:
engine=0;
}
+ qint64 objectId()
+ {
+ if ( (type == JSC) && (valid) && (engine) )
+ return (qint64)jscValue.asCell();
+ else
+ return -1;
+ }
+
static void saveException(JSC::ExecState*, JSC::JSValue*);
static void restoreException(JSC::ExecState*, JSC::JSValue);
@@ -160,7 +168,6 @@ public:
QBasicAtomicInt ref;
bool valid; //object is valid ?
- qint64 id; //object unique id number
};