| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Change-Id: I2aecdf789775c2363fb7990153951b45e2c42408
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This class is not a private detail of QQmlContext. And it is incredibly
hard to see who owns what in there. Let's add some civilization ...
We enforce refcounting for QQmlContextData across the code base, with
two exceptions:
1. QQmlContextPrivate may or may not own its QQmlContextData.
2. We may request a QQmlContextData owned by its parent QQmlContextData.
For these two cases we keep flags in QQmlContextData and when the
respective field (m_parent or m_publicContext) is reset, we release()
once.
Furthermore, QQmlContextData and QQmlGuardedContextData are moved to
their own files, in order to de-spaghettify qqmlcontext_p.h and
qqmlcontext.cpp.
When the QQmlEngine is deleted, any QQmlComponents drop their object
creators now, in order to release any context data held by those.
Before, the context data would be deleted, but the object creators would
retain the dangling pointer.
[ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does
what the documentation says now: It prefers explicitly set baseUrls over
compilation unit URLs. Only if no baseUrl is set, the CU's URL is
returned. It used to prefer the CU's URL.
Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-82313
Change-Id: I7c2f30411ab8011254d7c232c87cb12a39761bda
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
| |
Port incubateFor / incubateWhile to qint64. Since the implementation
was doing calculations in nanoseconds, a few seconds incubation was
sufficient to cause an int overflow.
Change-Id: Iba68260a1fd62613aec17ba990ead221c0f7da10
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
"volatile bool" does not guarantee synchronization, and as such,
the documentation (and the intended use case, having another
thread stopping incubation) are wrong. Add a different overload
that takes a std::atomic<bool> as a replacement.
Change-Id: I05e2d608385d075ef67989839d6c0a634da7a64b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
With required properties, we do not store the cache item as a context
object anymore. To fix this, we repurpose the (space of the) incubator
pointer of QQmlContextData to store the element there, and one of the
dummy bits as a flag to indicate the new usage.
Change-Id: I7cc435fc6781c603fe407411a60a6018239c972c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a delegates declares a required property of a given name, and that
name exists as a role in the model, we set the property accordingly.
The same holds true for the special properties that come from the
QQmlDelegateModel like "index" and "model".
All roles are still injected into scope and thus accessible;
changing this in Qt5 would be tedious or even impossible while still
maintaining backwardscompatibility with delegates that do not use
required properties.
Change-Id: I4f388ba549c42f1ff9822bdb3b8357c4d45e4b66
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml]
"required" is now a (contextual) keyword in QML, and users can
mark properties with it to specify that those properties must be set
when the component gets instantiated.
This can be done either declaratively via standard property
bindings from QML, or imperatively by using the functions to set initial
properties (QQmlCompoent::setInitalProperties and related functions in
C++, Qt.createObject, Loader.setSource,... in QML/JS).
Logic has been added to QQmlComponent::create and the various QQmlIncubator
classes to verify that the required properties were set. If properties
marked as required are not set, a warning will be printed at runtime,
and the component will not be created.
Change-Id: I8e38227fc8f173b053b689c1597dc7fd40e835e7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
I've never seen it used and I've never seen the companion library
required to operate it.
Change-Id: I5a0e6aed9a416f1bd26dea97def9667a11a4d77d
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the context or object in question gets destroyed during incubation,
that is not a major problem. We just clean up the mess and continue.
Especially, failure to create a delegate for an item view is not fatal.
This routinely happens if the whole view has been dropped between
object creation and incubation.
Since 0412de08fd65c5fef9d010a68b40a256f521ef61 info and warning levels
are properly separated.
Task-number: QTBUG-49224
Change-Id: Ie59dfca8edf91b80dcf33e742766863feba9c8fa
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-68933
Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a QQmlEngine warning handler that's called during component
instantiation results in subsequent component instantiations, either via
the signal or via a Qt message handler like in the bug report, then we
might end up modifying the linked list of errored bindings before
returning from the QQmlEnginePrivate::warning() call. The easy fix is to
extract the QQmlError, unlink the delayed error from the linked list and
then deliver the error to the QQmlEngine.
Change-Id: I6b7be61b57b35636282595937046ff76091144a3
Task-number: QTBUG-53293
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.
Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).
Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ca6b787a01ea289bd5c2a3e4ff3c7442a4ff58fc. This
internal API was added as a workaround for Qt Quick Controls 2. It
is no longer needed now that Qt Quick Controls 2 are using deferred
execution.
Task-number: QTBUG-50992
Change-Id: Iaddf22460f091743e1a68acd16813a28f3e82ecb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We generally have to pass a URL and a file name everywhere because the
logical URL might be something else than the actual file being loaded.
For example a QQmlFileSelector might modify the URL to be loaded for a
specific file. This resulting URL, however, should not be used to
resolve further URLs defined in the file loaded that way.
As we need to access QQmlTypeLoader::m_url as string more often now,
cache it and avoid frequent translations between QUrl and QString.
Furthermore, QQmlDataBlob's URLs are changed to follow the same
semantics. The finalUrl is the one that should be used to resolve
further URLs, the url is the one used to load the content, and subject
to any redirects or interceptions.
This changes the semantics of URL redirects. Previously a redirected URL
was used as the base URL for furher URL resolution. This doesn't work
because redirection occurs after interception and interception should
not influence the resolution of further URLs. We now use the original
URL as base URL for resolution of further URLs and rely on the server to
redirect those, too.
Task-number: QTBUG-61209
Change-Id: I93822f820bed2515995de3cb118099218b510ca4
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
| |
Change-Id: I0c4f5d908215b9b6fac0fadb352f7c36849dce6f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Don't use void * in our internals, when we can simply pass
a typed pointer.
Change-Id: Id02033c7e66df7e041c079d3546f9dd6027ef8d5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qt Quick Controls must avoid destroying any object that belongs to
a tree of objects being incubated. The problem is that QQC have no
control over the incubation process. This patch adds private API
that allows QQC to cancel incubation of a specific item that QQC
would like to destroy.
Change-Id: Id9f9004736e2b53fe46cdb6bb3055b7457def94d
Task-number: QTBUG-50992
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
... and drop redundant 'virtual'
Change-Id: Ib1f68c1ebd0468cb4a77eecc986bbf718f6bf789
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/quick/items/qquickflickable_p_p.h
src/quick/items/qquickpathview_p_p.h
tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
Change-Id: I77664a095d8a203e07a021c9d5953e02b8b99a1e
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/jit/qv4targetplatform_p.h
src/quick/accessible/qaccessiblequickitem_p.h
Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It makes more sense to process events until the incubator is Ready
rather than while it's already Ready.
Change-Id: If8b0c5057dd88ffdbb2dd39f53b5b9676d0b9d19
Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
and the incubator
Change-Id: I70d609ce282a537b67a5e7c01c12d9ce65995133
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This removes the last "user" of QQmlCompiledData apart from its circular usage.
Change-Id: I5383c9e7bba03617a1145cd43f52051848962013
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|/ /
| |
| |
| |
| |
| |
| | |
Remove two dummy forwarding functions
Change-Id: I053f9aecc761772c932550a0ddbea390621049c1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change also fixes the build of two benchmarks, tst_affectors
and tst_emission.
Conflicts:
src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
src/qml/qml/ftw/qhashfield_p.h
tests/benchmarks/particles/affectors/tst_affectors.cpp
tests/benchmarks/particles/emission/tst_emission.cpp
tests/benchmarks/qml/pointers/pointers.pro
tests/benchmarks/qml/pointers/tst_pointers.cpp
tests/benchmarks/qml/qmltime/qmltime.pro
tests/benchmarks/qml/qquickwindow/qquickwindow.pro
Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ic1bf883003f6e20efa3fdba9ad29a8c8276b043e
Task-number: QTBUG-51713
Reviewed-by: Topi Reiniö <topi.reinio@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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/qqmlobjectcreator_p.h
Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
|
| |
| |
| |
| |
| | |
Change-Id: Ica7ed02c9b67243310ddce3feaf91935b699086d
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>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4include.cpp
src/quick/items/qquickrendercontrol.cpp
src/quick/items/qquickrendercontrol_p.h
src/quickwidgets/qquickwidget.cpp
Change-Id: Ib2dc0051a38cd283a37a7665eb4a76f6f7ec8b15
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing
the guards in QQmlIncubatorPrivate::incubate() when a deletion was
detected.
If we detect a deletion, leave the guards in place, to be handled in
QQmlIncubatorPrivate::clear().
Task-number: QTBUG-40685
Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|/
|
|
|
|
|
|
| |
This is part of the effor of moving members from QQmlCompiledData into
QV4::CompilationUnit in order to eliminate the former in the long run.
Change-Id: Icce7fe0ee9a49cb3a7677fd7020008fc55ecdcf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I5d4b3e26742202c4b634d0001fd3658c7263c50a
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
| |
Change-Id: I432310c0e6006d567fd59b4b1021a9e1538ef78f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the bulk of the code. A few smaller cleanups remain, to be
done in smaller changes as they move code around.
Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData,
which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not
do anything and the class is gone now :)
Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to track the objects created and pass them over to the VME guard used in the
incubator. The incremental build nature of the incubator requires that to avoid crashes.
For nested incubators we need to set the activeVMEData field in the root QQmlContext, to allow
child incubators to locate the parent.
Lastly we need can emulate most of the VME behavior in terms of build states when running with
QQmlInstantiationInterrupt by presenting four build steps: The initial state, two build steps,
a finalization step and the state when we're done.
Change-Id: I16cd7f71744decb9d4735ec77e9d944fad18e88d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Protect against QQmlContext deletion during incubation re-using the existing
QQmlContextGuard.
Change-Id: Ia1c0241029765cc2e00a9b0ffcf484127de20606
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
The object tree construction and binding allocation remains synchronous, but
the initial evaluation of the bindings is now cooperatively interruptible
again, like in the VME.
Change-Id: Idd037dd481782c81ad43e20e93d922eb12ac8b85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
remove trailing spaces and expand tabs
Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Just enough to run some unit tests that use QQuickLoader, components are
created instantly.
Change-Id: I1c827aa946d3e2a60ccc220bb79572aca2ed8c96
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this change I'm getting this backtrace
3 0x4025b9f2 in QQmlIncubatorPrivate::incubate (this=0x18daa78, i=...) at qml/qqmlincubator.cpp:273
4 0x4025c1c2 in QQmlIncubator::forceCompletion (this=0x1527360) at qml/qqmlincubator.cpp:592
5 0x404e1626 in QQuickVisualDataModelPrivate::object (this=this@entry=0x13909f8, group=QQuickListCompositor::Default, index=index@entry=1, asynchronous=asynchronous@entry=false) at items/qquickvisualdatamodel.cpp:900
6 0x404e1f7e in QQuickVisualDataModel::item (this=<optimized out>, index=1, asynchronous=<optimized out>) at items/qquickvisualdatamodel.cpp:968
Note: This is with patched 5.0.x, change QQuickVisualDataModel to QQmlDelegateModel for >= 5.1
and line numbers may be a bit off
What is happening:
QQmlIncubator::forceCompletion is doing
while (Loading == status()) {
while (Loading == status() && !d->waitingFor.isEmpty())
static_cast<QQmlIncubatorPrivate *>(d->waitingFor.first())->incubate(i);
if (Loading == status())
d->incubate(i);
}
Calling QQmlIncubatorPrivate::incubate on the first item of d->waitingFor
Then, that item is getting to QQmlIncubatorPrivate::incubate and happens that
progress is QQmlIncubatorPrivate::Completed and waitingFor is not empty,
so the only thing that QQmlIncubatorPrivate::incubate ends up doing is
calling a few calls over vmeGuard and returning, that way the inner
waitingFor items never finishe incubating and you end up in an inifite loop inside
while (Loading == status() && !d->waitingFor.isEmpty())
static_cast<QQmlIncubatorPrivate *>(d->waitingFor.first())->incubate(i);
This patch basically replaces this loop with a loop that does
while (QQmlIncubator::Loading == status && !waitingFor.isEmpty())
static_cast<QQmlIncubatorPrivate *>(waitingFor.first())->forceCompletion(i);
This way we make sure we incubate the waitingFor items of our waitingFor items
Change-Id: I4298efc7ba9d8af624bb138e64b92a40ed4c4dc9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
This fixes possible bugs and crashes where the incubator
could get deleted through GC while constructing the
component.
Change-Id: Ibe0c5d4e172f0b5505ace0c3ea0369169b8b48a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
| |
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
| |
Change copyrights and license headers from Nokia to Digia
Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ica7685aefde84ec80d8af7a67541af454de4adce
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
|
|
|
|
|
|
|
| |
Some classes and QML types were missing these or had the wrong values.
Change-Id: Ic6376b8b450301f8ae0549e636f4bc2db4400f2b
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
|