| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: Idde38761897f078cd9957f01d34a9751217e4c53
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a C++ singleton has an enum with the value -1, we would expose that
value correctly when taking the accelerated property access code path in
the optimizer, but when going through the slower QQmlTypeWrapper we
would return undefined. This turned out to be a silly logic error that
assumed that -1 is not a valid value for an enum and instead indicates
an enum value not present.
[ChangeLog][Qml] Fix -1 as enum value in QML exposed C++ singletons
showing up as undefined.
Task-number: QTBUG-66067
Change-Id: Ib66dad7a4b59822b2c40ad6bd9af4b72469582e9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qqmltypecompiler.cpp
src/qml/jsruntime/qv4qmlcontext.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqmlcustomparser.cpp
src/qml/qml/qqmlimport.cpp
src/qml/qml/qqmlimport_p.h
src/qml/qml/qqmlmetatype.cpp
src/qml/qml/qqmlmetatype_p.h
src/qml/qml/qqmltypenamecache.cpp
src/qml/qml/qqmltypenamecache_p.h
src/qml/qml/qqmltypewrapper.cpp
src/qml/qml/qqmltypewrapper_p.h
src/qml/qml/qqmlvmemetaobject.cpp
src/qml/util/qqmladaptormodel.cpp
Change-Id: Ic959d03e6f9c328fb02710d9abbb0f27cddde131
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-61536
Change-Id: Ia2b5cfeab093d8be91728032528788dd238c2872
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure any QQmlType stored in the meta type data
has a refcount of 1. This should now make it possible
to clean out unused types by iterating over the
list of types and removing those that have a refcount
of 1.
Some care is still needed for C++ registered types, that
will need to get one more refcount, so we don't accidentally
remove them.
Task-number: QTBUG-61536
Change-Id: Id2a18dae5ddcb815f34013f5fde1f05d2d9d0214
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QQmlType is now refcounted, and we need to use it by
value, to control it's lifetime properly. This is
required, so we can clean up the QQmlMetaTypeData
cache on engine destruction and with trimComponentCache()
Task-number: QTBUG-61536
Change-Id: If86391c86ea20a646ded7c9925d8f743f628fb91
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-61536
Change-Id: Ie40cb3a6e170331b0ec7ab5deaf7c1d7ef0cdaeb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
That poor Q looked so lonely.
Change-Id: Ie4cef3fa8f2ecb8ba106654e8a9d6611a9407aa2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][QtQml] Support C++11 scoped enums in QML. These can now be
accessed as <TypeName>.<EnumName>.<EnumValue>
Change-Id: I29bd3f16e980f3e6f1b2390b5a8e9e8e999952a3
Task-number: QTBUG-54961
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][QtQml] The instanceof keyword in JavaScript has been
extended to work on QML types and instances. This means that you are now
able to use it to verify that a var is indeed the type you expect (e.g.
someVar instanceof Rectangle).
Note that one of the added tests revealed a slight shortcoming in the
QML type system (QTBUG-58477). For now, we should keep consistency and
work to address the problem universally in the future.
Change-Id: I7d9bf9b64cfd037908de1ae51b01065eacb95abe
Task-number: QTBUG-24799
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I6cbd83b61fac34c2ba6936711289ec09a490719a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QQmlType has more information than the bare QMetaType. The optimizer
already uses it for looking up enums, so some code would behave
differently, depending on whether the optimizer was enabled or not.
In some cases we cannot use QQmlType for lookup of enums because
QQmlType might have been created with only a callback. The object
only shows up later in that case. Then the only thing we can do is
query the metatype.
We can test this by adding an eval() because eval() disables
optimization for the surrounding code.
Task-number: QTBUG-58394
Change-Id: I8c90591b19fe1ed3e5339d877f9e6ec7c6f9aa73
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/
|
|
|
|
|
|
|
| |
Some parts of the ES6 (and even ES5!) spec specifically require handling
of a property write failure. This will be introduced in followup changes,
as it's going to be rather more involved than this.
Change-Id: Ie482493fcf4780df0e23619650a856421d20bd55
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
This removes the destructors of subclasses of Base, making them nearly
trivial.
Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
One of the steps needed to make QV4::Heap::structs trivial.
Change-Id: Ic4d73f15035af21c8a682aaad1ee68cdd91f8e7d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-46758
Change-Id: I14e394021c231bda5552c8d1c98f20c903a62f12
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>
|
|
|
|
|
|
|
|
| |
Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe
Task-number: QTBUG-43581
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
| |
Also disable the old way of constructing objects.
Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: in Qt Quick Controls 2, enums declared in the abstract
C++ base types were not accessible with the concrete QML type name,
but had to be referenced using the base type name:
Slider {
snapMode: AbstractSlider.SnapOnRelease
}
Solution: this change resolves the C++ base type and creates the
missing link between the composite type and its base type's meta-
object. This allows referencing enums using the concrete/composite
QML type name:
Slider {
snapMode: Slider.SnapOnRelease
}
Change-Id: Icefdec91b012b12728367fd54b4d16796233ee12
Task-number: QTBUG-43582
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I9c6174181f950bc4f829727dc6acdfe82fa4e894
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
Coverity CID 10721, 84861, 86705, 85424, 85422,
85259, 84863, 84857
Change-Id: Ia86970b5ac4e0be9de01b79b618d33011da6a328
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a flagged pointer to either store a pointer to a
QV4::Value (from the persistent storage) or a pointer to
a QVariant in QJSValue::d. Like this we don't need to malloc
to create a QJSValue for most use cases.
Significantly reduces the memory consumption of QJSValue and
speeds it up a lot.
Change-Id: I10902cc4b6cc3f43d3f816875dc6c4bbb6b4490f
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>
|
|
|
|
|
|
|
|
|
|
| |
Use a page wise allocation mechanism for persistent
values. This significantly reduces memory consumption
of persistent values and also improves their performance
a lot.
Change-Id: I8499d2ca5bdd871e029f643ae605a94544558bb5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I575ba208de24ffe90bd02905aba67b0b08c5115e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I6b26a8249175a86c6e15d000b24ba3300e112715
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I3a50aa3c0929c14ad856463635bf2fb2188f5c9f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Generate the code from a macro instead of duplicating boiler
plate code. Operate on Heap::Base instead of Managed.
Change-Id: I84c5a705980899be3e5b931a093645e50d3923bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ied5ad5b2fef494de77aefdb4a7ee25aff4d7722a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ifb3a7093351474d6feb2f64498b531c36fdf669b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I9d30081f71b83bc86f5e5714e23396b18c4d54c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
The methods don't require a context, and thus shouldn't be
implemented there.
Change-Id: If058e0c5067093a4161f2275ac4288aa2bc500f3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
The C++ standard doesn't allow calling member functions
on a mull object. Fix all such places, by moving the checks
to the caller where required.
Change-Id: I10fb22acaf0324d8ffd3a6d8e19152e5d32f56bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
| |
Change-Id: Icbdf06a077014db5dd57cba42f84591433ec4196
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Instead of allocating the data directly, centralize the object and its ::Data
allocation in one place in the memory manager. This is in preparation for
additional pointer indirection later.
Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ib1debebda1cc6dbfaf9c6dca40cde72800a2769b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Remove the Ref classes, as they won't be required
anymore once Managed and Managed::Data are separated.
Change-Id: Ic6bec2d5b4ecf2595ce129dbb45bbf6a385138a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ie569c4419addf31fc0297bbc4acdf08269a3e80e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|