aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4persistent_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-26 10:56:38 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-10 15:01:20 +0000
commit6a216bd820eddf64003bb525a849abe62a733807 (patch)
tree81203144794781935c846be71c7ffe4f41aeca41 /src/qml/jsruntime/qv4persistent_p.h
parent864988474a96145f0506a80aa36c341a9f29e85b (diff)
Get rid of StringValue usage in QJSValueIterator
Change-Id: I86badf9944b335041d16423be9a5434d1098cbb0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4persistent_p.h')
-rw-r--r--src/qml/jsruntime/qv4persistent_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4persistent_p.h b/src/qml/jsruntime/qv4persistent_p.h
index fe50b0ebfc..90e62e7aac 100644
--- a/src/qml/jsruntime/qv4persistent_p.h
+++ b/src/qml/jsruntime/qv4persistent_p.h
@@ -99,6 +99,12 @@ public:
return 0;
return val->as<Managed>();
}
+ template<typename T>
+ T *as() const {
+ if (!val)
+ return 0;
+ return val->as<T>();
+ }
ExecutionEngine *engine() const {
if (!val)