| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Change-Id: Ifa816ebcd79372afca42dbd0dc0ecde006bb688a
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
These methods do not modify the object.
Change-Id: Ide75590ee78cdc27652d9d88120197da5b40b0c8
Reviewed-by: Lars Knoll <lars.knoll@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same idea as the read accessors, but with a slight difference: the
property setters do emit signals, so we can't do a direct property write
and have to call the setter. However, it does circumvent the meta-calls.
There is one gotcha: if a property is intercepted (e.g. by a Behavior),
we still have to do the meta-call in order to dispatch the write to the
interceptor.
According to valgrind, this saves 138 instructions on x86 for every
"accessible" property write.
Change-Id: I07dbac95613415559ffa1691734a5af7c84721fc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the intercepting functionality of the VME meta-object was split into the
QQmlInterceptorMetaObject the property cache was moved as a member but the
manual refcounting remained in the QQmlVMEMetaObject constructor and
destructor. That's fragile and potential future sub-classes of the interceptor
would have to do the same refcounting. Instead let's just store a QQmlRefPointer
in the right place.
Similar logic applies to the QQmlDesignerMetaObject, which had a copy of the
property cache for now aparent reason.
Change-Id: I7f6d3917fc5ef1c4beb065525be10bb9c0fadcf3
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
QQmlCompiledData used to contain the binary data for instantiating QML types in
the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler
create a QV4::CompiledData::CompilationUnit.
Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
| |
It is unused now and we can remove it as well as its QByteArray based storage.
The non-emptyness of the meta-data QByteArray was also used to indicate whether
it is necessary to create a VME meta-object when instantiating an object. This
bit is now folded into the flag of the QFlagPointer storing the property
caches.
Change-Id: I3c3604c61ff16a4e76912e68b1c19afdb0f2bd9d
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
The remaining signal index for the changed signal of the alias target
is something that we need only once (when doing the initial alias endpoint
connection) and then we can retrieve it from the property cache.
Change-Id: Ifbd4625f9af3ca00c9b916eee5c82f58450d54ef
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
| |
We only need one bit, so this is easy to merge.
Change-Id: I98bf882b8c1bf10f2172a9e22331d621985d3ed4
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
We can retrieve the alias property index from the QV4::CompiledData::Alias and the
property type from the property cache (only needed for aliases to value types).
Change-Id: Ibf0cb909a4cd1ce1c2d67b57e1be1de491d4d598
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
| |
We can store the id (in QQmlContextData::idValues) for the alias target in the QV4::CompiledData::Alias.
Change-Id: I3f32648aef28d96ddedff6b3d2cde75969a46fa1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
The count of properties, aliases, signals and methods is also accessible through
CompiledData::Object.
Change-Id: I4693ea672b643cdaabf752c3f0d71abdcc032395
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For each type of VME meta object we store an array of integers holding the
meta-type ids of the QML declared properties. We can replace that array with
access to the QV4::CompiledData::Property entry for each property, where the
type is also accessible.
This is a fairly straight-forward change, except for the bit in
QV4::CompilationUnit where we delay the release of the CompiledData::Unit and
friends until the destructor instead of releasing it at unlink time. That
should be a safe change and is necessary as there are a few tests around where
the VME meta object still needs access to this meta-data at a very late stage
in the life-cycle right before the deferred deletion is run.
Change-Id: I431de15d12766df837c0e0251192df16a5a76868
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Instead of storing the methods of a qml object in an array of persistents,
let's just store them in the same member data array we also use for properties.
That reduces the amount of persistents and saves one pointer per instance.
Change-Id: I1ad1d9ec76b78fce01bc6ded7eaf536cb99dd245
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
| |
Get rid of the redundant MethodData meta-data that is stored per-type.
Change-Id: I9faa284bdd0c9f0c9ebb3c66905ab5e34a9ee3a4
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Real compilers now complain:
In file included from /Users/erik/dev/qt5-dev/qtdeclarative/src/qml/qml/qqmlvme.cpp:57:
/Users/erik/dev/qt5-dev/qtdeclarative/src/qml/qml/qqmlvmemetaobject_p.h:174:17: warning: 'metaCall' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
virtual int metaCall(QObject *o, QMetaObject::Call c, int id, void **a);
^
/Users/erik/dev/builds/qt5-dev-debug/qtbase/include/QtCore/5.8.0/QtCore/private/../../../../../../../../qt5-dev/qtbase/src/corelib/kernel/qobject_p.h:428:17: note: overridden virtual function is here
virtual int metaCall(QObject *, QMetaObject::Call c, int _id, void **a) Q_DECL_OVERRIDE
^
Change-Id: I1a1a9a210696c19f94f76eaf33adf93a10c86442
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
There is no good reason to have them in the public
interface. Reducing the visibility to the translation unit.
Change-Id: I79eb8450e17c199625b6c057df6976c26daa5a39
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I1d7c1571d63653d259f1c5aba53412f9a157083c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I1f605f7c1ce012d42deb6d1ba107db8dd71f5088
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I1582534b2d7be070483bcfb7df2562623b7695df
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes a regression introduced by change
01c0c0963794f4dd8c3601e8340cc3dc4dec41bd, where interceptors
wouldn't work correctly on alias properties.
This required some refactoring and splitting out the interceptor
handling from the VMEMO into it's own class, as we are now
installing bindings directly on the target property of an alias and
not on the alias anymore.
We now resolve the target property inside the QML object creator
and install a interceptor metaobject on the target if required where
we can then register the interceptor.
Change-Id: I3ebc8f492ce5dcab7acf901711b47336d5182ffa
Task-number: QTBUG-49072
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-48139
Change-Id: I12bec1ec72a99de0c3f5b4b12d22fba2b66c8f49
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
Remove some unused code
Change-Id: I1d6612649cf279834f9ce92da60a85495389555e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
There's no need to store the list properties separate from other
property data in the vmemo, simply wrap the list in a QVariant
as we do with the other more complex types.
Change-Id: I7c7946503cb603c401e11a367986c6923dffe68f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
We can track the state just as easily by simply checking if
the endpoints metaobject is already set.
Change-Id: I5cea909b2525bf37d404f6d54ead2bdf9538cff4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
There's no need for a separate propertiesAllocated bool,
we can keep that state in the WeakValue itself.
Change-Id: Ife0f517bee9bc5830680eec68983767379a3c2cf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I68f7ea476cb00a571908b7ec0a036f8517b091d5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Idc1da41586161f1c824c608198e232ba52a0d9d7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
This one passes in the qobject that the metacall
is being applied to. The long term goal is to make the
vme meta object independent of the QObject instance.
Change-Id: Ide34b8637b9963bdb5e87e4aa6e9c2ee825293f7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
These can be handled in a simple way now by using a special
propertyType value indicating that we have a var property.
Also remove the additional write calls in the different
readProperty implementations. If the stored data doesn't
match, we can simply return the default value directly.
Change-Id: I3823a971df24bd78f0acdc4c0042776277b3c55f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
In the new world order all the properties are QV4::Values. Therefore
this special handling can be removed.
Change-Id: Ia4d703256db7330936cd16a835d16d140adfe20e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Unlike the Array type the QV4::MemberData can be sized exactly so no
memory is wasted.
Change-Id: Ia7b9b846a7b8017787324e5243ccf6233568d41c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
Update the copyright notice on files containing larger changes from me.
Change-Id: I46cb83161331ef2f49a6ec92c078d6dc8019081e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
All properties have been move into the varProperties JS array.
Change-Id: Ib39a603d43ab5ef23aad3e6ccbdbc9b981c9da18
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
QObjects are now stored as QV4::QObjectWrapper in a javascript array.
This is part of a series of patches slimming down the memory usage
of QML properties.
Change-Id: I270831d0f0f7bc17842cd2f8d2eb9661e09a3364
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Store QDate/QDateTime/QRectF in a javascript array. The values are wrapped
inside a QV4::Variant. This is part of a series sliming down the memory
usage of properties.
Change-Id: I1b5c4e24c1e46d19c5c861941655efb7a972a6a5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Store QUrl/QSizeF in a javascript array. The values are wrapped inside
a QV4::Variant. This is part of a series sliming down the memory
usage of properties.
Change-Id: I62338fe7fe101496340a8d89f33030d0df5121b7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Store both "normal" properties and var properties in the same js array.
The second array which is removed by this patch was scaffolding for the
initial brinup.
Change-Id: I24f72a1d880a54f68f5562e5077dbc26e7db864a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
This is the first patch in a series of patches removing the QQmlVMEVariant
used for the storage of non-var properties. The overall goal is to reduce the
memory usage of QML. The QQmlVMEVariant has a size of 8*sizeof(void*) +
sizeof(int) which is quite an overhead for types such as int/bool or double.
Change-Id: I301661d134724300942911a3d75258fe45356a7a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/debugger/qv4debugservice.cpp
src/qml/jsruntime/qv4value_inl_p.h
src/qml/jsruntime/qv4value_p.h
src/qml/memory/qv4mm.cpp
src/qml/memory/qv4mm_p.h
src/qml/qml/qqmlnotifier_p.h
src/qml/qml/qqmlproperty.cpp
src/quick/items/qquickflickable.cpp
src/quick/items/qquicktextedit.cpp
tests/auto/quick/qquickwindow/BLACKLIST
The extra changes in qqmlbinding.cpp are ported from changes to
qqmlproperty.cpp that occurred in parallel with writeBinding() being
moved to qqmlbinding.cpp.
Change-Id: I16d1920abf448c29a01822256f52153651a56356
|
| |
| |
| |
| |
| |
| |
| | |
Found with GCC's -Wcast-qual.
Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|/
|
|
|
|
|
|
| |
This is a cleaner separation and further reduces include dependencies
in the definitions of our basic data structured.
Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e
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>
|
|
|
|
|
| |
Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to encode property index and value type property index in one int
with 16 bits each, for example font.pixelSize with index of "font" in the
lower 16 bits and "pixelSize" in the upper 16 bits.
Detecting if a given encoded index was using value types or not was based on
whether the value type index (upper 16 bits) were non-zero. That assumption
holds given that all valid property indicies of value types are > 0 because
they are all sub-classes of QObject, which provides the first property
(objectName).
With the introduction of gadgets property index zero will become popular again,
and value types are a core use-case for gadgets. Therefore we need to change
the encoding to allow for zero to be a valid value type property index. This is
implemented by centralizing all decoding call sites to call one function that
indicates -1 as non-present value type core index return value. That way we can
encode the index with an offset of 1.
Change-Id: I266abf140211a4f7204b47b94d07c364f0a8f408
Reviewed-by: Lars Knoll <lars.knoll@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object
Because QQmlObjectCreator::populateInstance would take the property cache to
install from the outside and also pass it as the cache to use for the VME meta
object to install, it could happen that the wrong cache was installed - the one
supplied by engine->cache(propType) instead of the cache created together with
the VME meta-object at type compilation time.
This patch ensures that they're always in sync and correct by removing the
responsibility of the caller to supply the cache to use and install. Instead
the function will always use the cache calculated at type compile time (and
also use that when installing the VME meta object).
Installation of the property cache on the declarative data of the instance is
now done only at createInstance() time, which fortunately also simplifies the
code.
Change-Id: Ia722cd57bc48007aaf725f1f59daa2f21569e324
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename qv4value_def_p.h -> qv4value_p.h and qv4value_p.h to
qv4value_inl_p.h.
It makes more sense to have the class definition in the file
that is named after the class and move the inline methods into
a _inl file. Doing this now, as I expect we'll be needing a few
more _inl files soon.
Change-Id: Ib59e9380e9e976254c6b4369574157f39b1b5f51
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|