diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-14 12:50:34 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2015-01-21 18:22:47 +0100 |
commit | d8131513b07d3f0a6d749c9961b294fc955fed6d (patch) | |
tree | 8d757fffe19623bd1ea78a40240dc41c25b81a8f /src/qml/jsapi/qjsvalueiterator.cpp | |
parent | 630f118f043edb88501e387d779c62c86b1030d4 (diff) |
Add C++11 move operators, and a simpler internal constructor
Move semantics should optimize some copy operations on QJSValues,
and the internal constructor will simplify refactoring the
QJSValue class to get rid of the extra allocated private.
Change-Id: I24863b30523af2432aa81ad6b87fda7fe35749c4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsapi/qjsvalueiterator.cpp')
-rw-r--r-- | src/qml/jsapi/qjsvalueiterator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsapi/qjsvalueiterator.cpp b/src/qml/jsapi/qjsvalueiterator.cpp index e23bd5d763..2b27f655c8 100644 --- a/src/qml/jsapi/qjsvalueiterator.cpp +++ b/src/qml/jsapi/qjsvalueiterator.cpp @@ -201,7 +201,7 @@ QJSValue QJSValueIterator::value() const engine->catchException(); return QJSValue(); } - return new QJSValuePrivate(engine, v); + return QJSValue(engine, v.asReturnedValue()); } |