| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| | |
This is what's in the Value in all cases anyway.
Change-Id: I212c4c4076050e8d0ea4cf6f72a1683e132cd51b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The class should get merged with the QV4::QmlContext class.
Simplify the cleanup by moving both classes into a common
file.
Change-Id: I0074da79701d5f41eb51681b70fcde85bfd45fc1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The renderers added in 5.8 had to be adapted to the changed profiling
macros from 5.6.
Conflicts:
src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
src/quick/util/qquickprofiler_p.h
tests/auto/qml/qjsengine/tst_qjsengine.cpp
tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp
Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/qml/compiler/qv4ssa.cpp
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
src/quick/util/qquickprofiler_p.h
Change-Id: I11a89c2a166115d6697adfba09928805643e709e
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
QMetaProperty::type() maps an un-registered enum to QMetaType::Int, and
so if a property cache is created for a gadget with enum properties,
then their type will be int and we'll correctly read enum properties as
ints in JavaScript. However if the enum is registered at the time we
create the cache, then the property type will be the specific type and
not QMetaType::Int. The property reading code in QV4::QObjectWrapper can
deal with that, but the property reading code in the gadget value type
wrapper code did not.
[ChangeLog][Qt][Qml] Fix reading of enum properties from gadgets / value
types when the enum was registered with qRegisterMetaType().
Change-Id: I7812b216a276dcc95c36e313507e1a1142250d0b
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/qml/jsruntime/qv4variantobject.cpp
src/qml/types/qquickworkerscript.cpp
src/quick/scenegraph/util/qsgdefaultpainternode_p.h
tools/qmljs/qmljs.cpp
Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Check that the destroy() method of Heap::Base was called when a Managed
object needs destruction. This checks if a call to the parent's
destroy() method was accidentally omitted.
Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
GCC6 might dead-store-eliminate out our secret write to Base::mmdata,
because it expects all memory content to be "undefined" before
constructor calls. Clang might take the same approach if the constructor
of Heap::Object is removed.
By making these structs trivial, it also makes them memcpy-able.
Change-Id: I055b2ad28311b997fbe059849ebda4d5894eaa9b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
So now VariantObject is nearly a trivial struct.
Change-Id: Ifc54c04d9686c03e12066c5287823dd3b1315d2a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
These methods do not modify objects.
Change-Id: I67b1a10cfd0b32688500fca3265a96f53afd1b57
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
One of the steps needed to make QV4::Heap::structs trivial.
Change-Id: Ic4d73f15035af21c8a682aaad1ee68cdd91f8e7d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And add accessors. This makes it easier later on to change the storage
of the fields.
Change-Id: I21163668ac83a7d52f398981baf3c27ef161c177
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use QStringBuilder more.
Use QString::asprintf instead of arg()'s chain.
Use += operator to reserve extra capacity for
possible free following append/prepend/+= call.
Change-Id: Ib65398b91566994339d2c4bbfaf94e49806b7471
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I2ae2fb0f18af9b866cc9482fd4f42d9d4269f8cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will make it easier in follow-up patches to add or remove flags. It
also shrinks the flags, because each type doesn't need its own bit (as
those are mutually exclusive).
Change-Id: I5ba6de5f330eb20c82aa16b4467ed6c952725979
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This helps in making it clear when an index is a plain old number and
when it consists of an encoded value type index.
Change-Id: Ic50d95caf244ed0ee2d62bdba53910a371cfee04
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we can determine the type of a target property during type
compilation, we can skip a whole bunch of code that deals with
converting the result of a binding to the correct (target) type.
This removes 65 instructions on x86 for such typed bindings.
Change-Id: Id2c7c57b9ae6dfbeb921121beae9630604ca1d17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/jsruntime/qv4engine_p.h
src/qml/jsruntime/qv4runtime_p.h
src/qml/qml/qqmldelayedcallqueue.cpp
src/qml/qml/qqmlvaluetypewrapper.cpp
src/qml/qml/qqmlvmemetaobject.cpp
src/qml/qml/v8/qv8engine_p.h
tests/auto/quick/qquicktext/tst_qquicktext.cpp
Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All other changes are just to be able to include qv8engine_p.h in
qv4engine_p.h
Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It should be possible to enumerate the properties of value types (gadgets),
in order for things like JSON.stringify(Qt.point(10, 20)) to return something
sensible.
Task-number: QTBUG-43382
Task-number: QTBUG-34878
Change-Id: I3a2c09151ebe97fd97760dfbbf5a4f58e022bc94
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|/ /
| |
| |
| |
| | |
Change-Id: I7689fabb5398c2c2d2781b2c788dcc60f4e1ea44
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\|
| |
| |
| | |
Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When reading a propety from a QGadget or a QObject, the values are
stored in a QVariant and later unwrapped/converted to the correct
JavaScript type. However, if the property value is a QVariant, it does
not need to wrap it (again) in a QVariant.
Change-Id: I633d3194f82b6032fc15d9994c4dee5e5609fd21
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
| |
Slightly speeds up construction of value type wrappers
Change-Id: Ia50e9bcdb07475ed15b5aac908714d25631a0de8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
Also disable the old way of constructing objects.
Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
Reduce usage of ScopedContext.
Change-Id: I84a6a7478065de3398fd0b21596ca1308e78ceb3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/qml/qml/qqmlengine.cpp
src/quick/items/qquickitemsmodule.cpp
tools/qml/main.cpp
Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-45528
Task-number: QTBUG-45530
Change-Id: I83c4056b4bde37ef2dc4424ffddd823c1654d92e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: I9c6174181f950bc4f829727dc6acdfe82fa4e894
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It only contained the proto for the value type wrapper. Instead
just create it lazily, but reserve space on the js stack for it.
Change-Id: I2301549b6dc4007bd5ac848e1dca25aafd583c4a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ib55c05f1730b7659e2f6fee7e1fa79c10c759167
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refcounting our bindings greatly simplifies our memory management
of the objects and ensures we safely clean them all up. In addition,
it allows us to remove the m_mePtr and weak reference handling from
QQmlAbstractBinding as we can safely handle this through the same
mechanism.
Change-Id: If23ebc8be276096146952b0008b62018f5d57faf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/quick/qquicktext/tst_qquicktext.cpp
Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
|
| |
| |
| |
| |
| | |
Change-Id: I9d0f63c41609c4aaef272fabafd5b1272853a099
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Reduce the number of setBinding/removeBinding overloads and
simplify their internal handling.
Change-Id: I87174a3b2dc0ecb8380e8fc28f8969fbf475c728
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The pointer is never used in practice, so let's get rid of it and
save some memory.
Change-Id: I8dccafb4cd3e14397fcf1c30633d60ea7ea9ce0c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/qqmlbinding.cpp
src/qml/jsruntime/qv4arraybuffer.cpp
src/qml/jsruntime/qv4functionobject.cpp
Change-Id: Ic752e9dfd69b282093651c9234c110a49762f06d
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a binding results in a value type reference and the destination property
is of the same time, then we can avoid a heap allocation and just allocate
the value type memory on the stack, construct, copy and destruct.
Change-Id: If71ef82b0ced85c1b962c5e44147d6c07edd1440
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Avoid calling QMetaType::construct/destruct(typeId, ...) as that requires
repeated lookups in the type registry. Instead cache the constructor/destructor/etc.
function addresses in the QQmlValueType singletons as QMetaType
* Allocate memory for the gadget pointer lazily, to accommodate the common case of
a value type binding by property reference.
Change-Id: I98a3ac73453b8f80027c06401b4f29a9707949d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Get rid of Value::asObject(), and pass const Managed pointers
into some more vtable methods.
Change-Id: Ia4f427d5fd8868f77b4015d1ce5424d32bfc2115
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
| |
The get and getIndexed vtable methods should take a const Managed
pointer. Start cleaning up the asFoo() methods in Value and Managed
by removing asArrayObject() and asErrorObject().
Change-Id: Ibd49bf20773ef84c15785b7ac37a7bc9fd4745d5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Simplify some code in BooleanObject
Simplify access to call arguments and thisObject
Change-Id: I2f8e844019bc587385608beb02f05b15f827535c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead pass a const Value & into the functions
With our new inheritance structure, we can get rid of ValueRef
and instead simply pass a pointer to a Value again. Pointers to
Values are safe to use again now, as they are now guaranteed to
be in a place where the GC knows about them.
Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
The memory manager's allocation methods now set this up correctly
for us :)
Change-Id: I8492bf732df601f95a1a851fb3804127ffc83935
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it easier to customize displaying Q_GADGETs that don't
have a toString() function defined. Instead of having to define
a wrapper Q_GADGET class, it's more straightforward to register a
meta-type converter. Finally, it ensures consistent value displays
between QML and the rest.
Change-Id: I76f93ee0bafabd74f311130972b49c572b38f43f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Instead use the vtable to identify that we have a
binding function.
Change-Id: I794aebb6fb83f648ba36f2f15cad94d2af3cae91
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Make public methods proper members of the ExecutionEngine, and
move private methods into the .cpp file only.
Change-Id: I3ca49e39bb1c4e559a2c63346e6ae6cfa446147d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|