| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Instead of maintaining a hash per QQmlType and minor version, move the
version specific property caches into QQmlType.
Task-number: QTBUG-61536
Change-Id: I72f3990cb93e64ac5074060b4ff327043eab7966
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the property cache is independent of a specific
engine, we can cache them in QQmlType instead of caching
them per engine.
This simplifies the logic and avoids duplicated property
caches when multiple engines are running.
Task-number: QTBUG-61536
Change-Id: I6f082e1e7495ae0f5b92559e8d0a3437c56e303a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is where it belongs, and it makes the PropertyCache independent
of the engine used.
Task-number: QTBUG-61536
Change-Id: I21c2674ee3e2895abd2418764d140b154b47b868
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4object_p.h
Change-Id: Iff4d3aba7710a999b8befdc493cbe959e1ce02f9
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QQmlListReference passes a QLatin1String in, which can behandled by the
stringCache just fine. So if there is a cache entry, then this will skip
toQString conversion.
Change-Id: I13afe4f6e63d486b313ac58cbd86fb7f9e1a80f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Now we can pass 'name' arg as QStringRef. Client code can
reduce allocations.
Change-Id: I444f7135f4912f54d57e0a1193f330a3976fc186
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
tools/qmljs/qmljs.cpp
Change-Id: Ifa9e74bdb780eaff22fbc9ba1c514d0078a3fb29
|
| |
| |
| |
| |
| |
| |
| |
| | |
... so the fast-path doesn't get bogged down by accidental slow-path
inlining.
Change-Id: Ifb3eadf5e96b5a61f41fb1f0d32269e43f13be57
Reviewed-by: Lars Knoll <lars.knoll@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
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
examples/quick/quickwidgets/quickwidget/main.cpp
src/qml/jsruntime/qv4jsonobject.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/jsruntime/qv4qobjectwrapper_p.h
src/qml/qml/qqmlengine.cpp
src/qml/qml/qqmlpropertycache.cpp
src/qml/qml/qqmlpropertycache_p.h
src/quick/items/qquickanimatedsprite.cpp
src/quick/items/qquickitem.cpp
src/quick/items/qquickitem.h
src/quick/items/qquickitem_p.h
src/quick/items/qquickview_p.h
src/quick/scenegraph/qsgcontext.cpp
src/quick/scenegraph/qsgdefaultrendercontext.cpp
Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
|
| | |\
| | | |
| | | |
| | | | |
Change-Id: I48764527fa1ab6d8d59c24552394459b1cdc58ee
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Mark QQuickItem visual children directly in QQuickItem instead of
relying on the item being a (grand) child of a window.
[ChangeLog][QtQuick] Fix crash with QQuickItems created via JavaScript being
garbage collected sometimes when they're not assigned to a window.
This may happen even in qmlscene when between the creation of the root item and
the assignment to the QQuickWindow the garbage collector runs.
The previous approach of a persistent in QQuickView marking the visual item
hierarchy relies on the existence of a view. The only thing left to do in the
view and qml window implementation is enforcing the CppOwnership policy set on
the content item in QQuickWindow by ensuring the presence of the JS wrapper,
replacing the persistent with a weak value.
This also introduces a new internal mechanism for QObject sub-classes to
provide their own V4 JS wrapper types.
Task-number: QTBUG-39888
Change-Id: Icd45a636a6d4e4528fc19165b13f4e1ca7967087
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
These methods do not modify objects.
Change-Id: I67b1a10cfd0b32688500fca3265a96f53afd1b57
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
... and drop redundant 'virtual'
Change-Id: Ib1f68c1ebd0468cb4a77eecc986bbf718f6bf789
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I70a080feb401cf23aef1bde44a19a11e27642f30
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I7a781eb3cb0af9c68b385af5752555bd9cb313d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We can now always check if the pointer is null (no accessors) or not.
Change-Id: Ie9abf2f8930ea1f75a6d637a47f7f9c4fbab1151
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
By getting rid of the unions, all "features" (like accessors and notify
indices) can now be used for all properties or functions. Other fields
are trimmed to the size as used in other parts of QML.
Now the size of QQmlPropertyRawData is 24 bytes on 32bit platforms, and
32 bytes on 64bit platforms.
Change-Id: Ie2f22eb60e6119c93e3d3ea32a2974a718d45e91
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This information can be recreated when needed: the property/method index
is known, just like the meta-object, so we can query that for the
type name.
Change-Id: I9d4f557eda4e4a946a80b68d3787823767b0b1d3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I4f1aaf92fd1c67ec18ab0f80d6d0bf58b4af6a17
Reviewed-by: Simon Hausmann <simon.hausmann@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>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I2ae2fb0f18af9b866cc9482fd4f42d9d4269f8cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ibcae6b396677c5d4648f59a4c5998a08862cb033
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
By running an md5 hash over the meta-object data and string tables this will
allow us to detect changes to meta-objects and invalidate QML disk caches.
Change-Id: I15b92de4cdf0cb525281b86e1c7b8ba0b11347a0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will be used later for calculating checksums of the meta-object
data.
Change-Id: Iba925eae298cbfc7b89196f4dd6fb2854ce75e2e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Pass property reads/writes through utility functions in QQmlProperty,
which in turn will try to use accessors when available (and no
interceptors have to be called).
Change-Id: I60ecfc202b6024bfe4a33206a46299787b152546
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Similar to the regular property cache creation code, this also has to become a
template function so that it can be run on the compilation units loaded from
disk in the future. What is shared between the code path of a fresh compilation
vs. re-use of a unit from disk is the code to propagate the CompiledData::Alias
entries into entries in the property cache. The code for iterating through the
component spaces and resolving the alias references is not shared.
Change-Id: I04c2a5575310400156b457ae7b709cffecb7455e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These are simple and often-called methods.
Change-Id: Id681c75e13ec262c17dc00ce9f3a0c30c9183991
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Give the template type a fitting name, use a parameter name that is
slightly more descriptive than "dummy", and pass it around by pointer
like we do in other places.
Change-Id: Ie7051a6053fc8d2f9c3ea92ee3ce18e57dc5e62a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will allow the use of it also against a QV4::CompilationUnit and assorted
data structures loaded from the disk.
Change-Id: I4f337d1fcf319e80e422448671476db907de6d9e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The QQmlPropertyCacheVector in the CompilationUnit encapsulates the
property caches for the objects declared in the QML tree as well as the
bits indicating whether a VME meta-object is needed. The ref-counting
for the caches in that vector was done "manually" and thus error prone.
This patch replaces the vector with a wrapper container that has
explicit move semantics and takes care of the addref() and release()
calls upon insertion, replacement and destruction.
Change-Id: If805fe016f1a1c70e56f8a90909ab87b653ea026
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QJSEngine::newQMetaObject let us expose QMetaObject to the QJSEngine,
allowing to construct QObjects instance from javascript.
Additionally, enums values are exposed as property of the QMetaObject
wrapper.
(The engine takes ownership of the created objects)
Change-Id: I5428d4b7061cceacfa89f51e703dce3379b2c329
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: I694ac053b53b669ef5578fd0074de5ce109f7a09
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Reorder inline functions so that QQmlPropertyCache::ensureResolved()
is visible from where it is invoked (QQmlPropertyCache::property()),
fixing error:
qtdeclarative/src/qml/qml/qqmlpropertycache_p.h:559:26: error: 'QQmlPropertyData* QQmlPropertyCache::ensureResolved(QQmlPropertyData*) const' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]
inline QQmlPropertyData *QQmlPropertyCache::ensureResolved(QQmlPropertyData *p) const
Change-Id: Id0f0b5b92d377c71f5950011ba993e53d783bfb8
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a property is read from a QObject or the QML scope object, and we
can statically resolve the type to qreal/QObject/int/bool/QString, and
the property has an accessor declared for it, then use that accessor to
do the read.
This collapses the path of e.g.:
Runtime::getQmlScopeObjectProperty
-> QObjectWrapper::getProperty
-> QObjectWrapper::getProperty
-> LoadProperty
-> QQmlAccessor::read
(all of which do various checks for all the stuff mentioned above) to:
Runtime::accessQmlScopeObjectQRealProperty
-> QQmlAccessor::read
which is a simple 4-line function, and doesn't need to do any check.
According to valgrind, this saves 170 instructions on x86 for the
simple binding:
Item {
width: height
}
Change-Id: I0761d01e8f1a3c13ecbffe2d8e0317ce9c0a4db0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Most of these methods are small, and all of them lie in the 'hot path'
for simple bindings like 'width: parent.width'.
Change-Id: I0071cec92b49437a352160b0283ed6c89a278a07
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
This parameter was not used.
Change-Id: I1e8c0994cad37fc24105e354a80a4fb0131d58ee
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: Ifd9fe32b80cd1ebc8dc9fda7c252ecdaae42cb37
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ib75bf9de898975dcbb98b411a1e98524754c0788
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Iaa89515891624602cf63701364c77e49ea1e1bd9
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Idc1da41586161f1c824c608198e232ba52a0d9d7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
This makes more sense than a pointer to the QQmlEngine.
Change-Id: Ic6037b0df63b6cf1585539bc3ac78822f0e69d02
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I075cd56695c8d7fe7e46be2a2c4a575ca53fadaf
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: Ic4a944b4f1dd02ad2f0284acad5f3135068f66df
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
For gadgets/value types we use moc's static_metacall, which doesn't call the
parent class implementation. Therefore before placing a static metacall we
must resolve the indicies and find the right meta-object.
Change-Id: I258e3d9ecfc704498c68772dc42b16134a3bfd83
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|