| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing the prototype of an object back and forth leads to a
'cyclic' reference in the internal class transition tables. If
one of those objects then gets a new property, we would get an
infinite stack recursion trying to update the internal class IDs
of the classes using this prototype.
Fixed by skipping protochanges and vtable changes in the update
code. That's ok, as those classes will always be reached through
other paths from the empty class.
Task-number: QTBUG-68369
Change-Id: Ie54ca5171a92f8e8b146a91376e435478ff70185
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code path was previously missed, leading to some AOT-compiled types
generating errors of the form:
Unable to assign [undefined] to int
[ChangeLog][QtQml] Fix QML declared enums with CONFIG+=qtquickcompiler.
Change-Id: Ib46a2b2505aa3863f091a6ccdebf8425e62fc38f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Makes it easier to open them via the locator, for example.
Change-Id: I8a5a0beba315da25b14bf2d519974e175f39567f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
clearGrabbers() will also clear QQuickWindow::mouseGrabberItem(), so we
have to retrieve a copy of the mouse grabber item in advance of calling
clearGrabbers().
This could happen when a filtering parent actually called grabMouse() on
mouse release(!) event.
Change-Id: I287214dbdff802707be625d73c38dd9c5d723aef
Task-number: QTBUG-68030
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading a .js file without QQC, we scan the sources and use the
ScriptDirectivesCollector to extract things like .pragma library or
.import ahead of time. That information is passed on to the compilation
unit generator for serialization. When compiling .js files ahead of
time, we also used the same collector, but we forgot to save the data
into the right location before serialization, so we essentially lost the
imports. This patch fixes that by centralizing this code into the
ScriptDirectivesCollector itself.
[ChangeLog][QtQml] Fix regression with .import in .js files not working
when using CONFIG+=qtquickcompiler.
Change-Id: I5413c14b1b8bd3114a997011534fe55cdb7634aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
For details see QTBUG-67757.
Task-number: QTBUG-53916
Change-Id: I142a418fc22e6cdf64ab571ea2759e00c8101c47
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QMovie emits the signals updated() and frameChanged(), and restarts
right after its timer to prepare for the next frame. Since AnimatedImage
destroys its underlying QMovie when its source changes, the lines after
emit frameChanged() in QMovie will use free'd memory and will most of
the time produce a crash.
This fix delays the destruction of the underlying QMovie of
AnimatedImage using deleteLater() to prevent this kind of behavior from
happening without impact/behavior change in the code of QMovie. Unit
tests added as well to cover this situation.
This commit also fixes a similar crash when Component.onCompleted is
called and when the source changes in the associated callback.
Task-number: QTBUG-67427
Change-Id: Ic6568a1bc251e5fa2ee1cf8e5f50eaa56c3007db
Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Louis du Verdier <louis.du.verdier@free.fr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f6bbeeb417102c61e8bf23f41e412ed9753a348d began normalizing the
resource urls in the type loader, which broke loading of qml singletons
from resources, as the normalized url is also used for the "pragma
singleton" verification to check that the singleton is in the meta-type
registry. If the registration was done with a non-normalized url, the
check would fail with a misleading error message.
Task-number: QTBUG-68025
Change-Id: I1093ee0cbee884b4a51195c302c8908f748e747e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
|
|
|
|
|
|
|
|
| |
Its unreliable and we don't know why yet.
Task-number: QTBUG-66866
Change-Id: I963a0070e5819b20d0e811f749cf623113eb9d26
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: Ieb14322c104d816842e04e521b556bfc11855f1c
Task-number: QTBUG-67024
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
./stringmodel.h(63,9): warning: 'rowCount' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
int rowCount(const QModelIndex &) const
^
./stringmodel.h(73,17): warning: 'columnCount' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
virtual int columnCount(const QModelIndex &) const
^
./stringmodel.h(83,25): warning: 'index' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
./stringmodel.h(92,25): warning: 'parent' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
virtual QModelIndex parent(const QModelIndex &) const
^
./stringmodel.h(97,14): warning: 'data' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
QVariant data (const QModelIndex & index, int role) const
^
tst_qquicklistview.cpp(8695,18): warning: unused variable 'ctxt' [-Wunused-variable]
QQmlContext *ctxt = window->rootContext();
Task-number: QTBUG-63512
Change-Id: Ie928981a601d0462cfadd093815d110f6971d7f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Due to heavy load in ci test vm, the animation perhaps didn't
start after QTest::qWait(100).
Task-number: QTBUG-67939
Change-Id: I8c786c82ea41c3d3514ab6bddaefb0c584f35fe0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
When used on for example delegates we can and should also print the line
number and column where the component is declared.
Change-Id: I0f02c675425700cde119352d0001895cc31a4c73
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
| |
This prevents loading of types with slightly different paths multiple
times, like "qrc:/One.qml" and "qrc:///One.qml".
Task-number: QTBUG-65723
Change-Id: I6e26db6d1d271b2ed37b97eb990618843e99c372
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I08e952fb8c19c21caf33ffb1cfdc260b533a01d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If lists had spacing, snapping would have gaps where snapItemAt would
return nullptr eventhough there were items above and below in the list.
I.e. if we have a list with items of size 100, and a spacing of 100, and
scroll to 110 (right below the first item), then the first item would fail
because this is false:
itemTop+itemSize()/2 >= pos (50 >= 110)
And the next item (the one we should have snapped to), would fail because
this is false:
itemTop-prevItemSize/2 < pos (200-100/2 < 110)
The meaning of first part was probably to see if the middle of the current
item is inside the view.
The meaning of the second part was probably to see if the middle of the
previous item is outside the view.
This patch refactors the code so it's more visible what's happening and
fixes the bug by taking the spacing into account when computing the position of
the halfway positions.
Task-number: QTBUG-59852
Change-Id: I60eec0d16e91d2f22d70b97d11bcde5d88ac2997
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
This enables us to drop the QML dependency from a number of tests. This
is desirable because we want to test that we didn't do any incompatible
changes to the debug framework.
Change-Id: I937dd45d3079eac15c200c9d68bb4c911f61afc0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means QtQmlDebug needs its own qqmlprofilerdefintions.h. This is a
good thing because this way we notice if we change the definitions in an
incompatible way. The test uses QtQmlDebug after all. Also,
qqmldebugserviceinterfaces_p.h is not available anymore, which means the
service names have to be spelled out. This, also, is beneficial as it
prevents us from accidentally changing the names.
In the context of QmlDebug we don't need to namespace the profiler
definitions, either. This simplifies some code.
Task-number: QTBUG-60996
Change-Id: Ibb39e48c9b758687d68b8ce4431f45eb26939a09
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The submodule has now reverted my "fix" for a test the ES spec
initially lead me to think was misguided; the test is fine, in fact,
but I was using the wrong time-zone to run it. That's now fixed here,
so we can take in the revert of the mis-fix.
Task-number: QTBUG-67010
Change-Id: I89c8236ce11ee4dc16eb145e37f4510e19977bb2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amends commit 2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68.
The very last test (15.9.5.43-0-8) in the ES test-suite relies on
constructing a time *just* outside the valid range, to provoke (and
check it gets) a RangeError. However, it uses the current time-zone
offset in computing this; and the local time -> UTC conversion in the
Date constructor uses the zone information for the zone at the given
time. The TZ db uses each zone's local mean solar time for the period
before a formal zone was introduced; and Vancouver is further West
than the nominal meridian for its zone. The test code throws in an
hour's correction in case it's run in daylight-saving time, which
would put the test time, when run during standard time, an hour (and a
millisecond, rather than just the millisecond) outside the valid Date
range, so as to ensure it's still a ms outside when the test is run
during DST. However, the 12m28s mean solar offset overcomes the 1ms
and puts the time back in range durign DST (but still 47m32.001s
outside during standard time, which is why this problem only surfaced
when North America entered summer time). Fortunately, Los Angeles is
further East than the meridian in question, and uses the same zone.
Task-number: QTBUG-67010
Change-Id: I58fd7bf14366ebe5842b8abd7e6802c9c78ca27e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider the following example:
Item {
width: 100
height: 30
Text {
width: parent ? parent.width : 0
height: parent ? parent.height : 0
elide: Text.ElideRight
text: "wot"
}
}
When setting the Text item's parent to null, its explicit width and
height are set to 0. When restoring its parent (the Item), its
explicit width and height are set to 100 and 30 again, but the text
itself is still not rendered.
The cause can be seen here:
if (!(widthChanged || widthMaximum) && !d->isLineLaidOutConnected()) {
// only height has changed
if (newGeometry.height() > oldGeometry.height()) {
if (!d->heightExceeded) // Height is adequate and growing.
goto geomChangeDone;
heightExceeded was false, because 30 > 12 (or whatever the implicit
height happened to be), so the text was not laid out again, even though
it went from having an explicit height of 0 to an explicit height of
30.
Fix the issue by only executing the goto if the old explicit height
wasn't 0.
Task-number: QTBUG-60328
Task-number: QTBUG-67145
Change-Id: I7f4d2f95bc95c850133ba91ac2d1a02c7ee159b6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling Qt.binding() on a bound function object is a valid use
case and used to work until Qt 5.8.
The problem was that we optimized the code in QQmlBinding and
QQmlJavascriptExpression to directly work on a QV4::Function,
so this wouldn't work anymore.
To fix this make sure recursive calls to Function.bind() are
unrolled (so that the BoundFunction's target is never a bound
function itself), then add the bound function as an optional
member to the QQmlBinding and use it's bound arguments if
present.
Task-number: QTBUG-61927
Change-Id: I472214ddd82fc2a1212efd9b769861fc43d2ddaf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Stringify::JA takes an ArrayObject* but it merely gets the length
property and does indexed get calls. Those work also on array-like
objects such as our sequence wrappers.
Task-number: QTBUG-45018
Change-Id: I4ec4f89a2e09c918fbc2ff1d48ae5915e67ce280
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Add user documentation of the compressed texture file support and the
file extension auto detection.
Change-Id: Icfae8574dd3acba30e8275ccd6ff3438fa037868
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When pressing tab/backtab then the offscreen window needs to pass it on
to the item in case it will handle this for changing focus. If it does
not handle the event, it will pass it back for QWidget handling.
[ChangeLog][QQuickWidget] Tab presses are now passed on to the root
item to be handled first. When not handled by the root item, it will
be handled like a standard QWidget.
Task-number: QTBUG-45641
Change-Id: Ief0552ba496c87ab0b6e12aa8e67ef44b5a20ae2
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
eval("function(){}") would return a function object in our engine.
This is not compliant with the ES spec, so warn about it, as it'll
start throwing a syntax error in 5.12.
Also fix the two places where we were using that syntax in our auto
tests.
Change-Id: I573c2ad0ec4955570b857c69edef2f75998d55a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our XHR implementation insists on a valid QQmlContext when processing
callbacks. This is to protect against callbacks being triggered after
dynamic QML contexts such as delegates have been destroyed.
Unfortunately those checks are too strict and make it impossible to use
XHR from within plain JS scripts (where v4->callingQmlContext() will
return a null pointer).
Dispatching the callbacks in functions that are directly called from
QML/JS is safe and something we can do unconditionally. This applies to
the callbacks triggered from abort() and open() for example.
When we're called from QNetworkAccessManager we should enforce the
continued existence of a QML context only if it was present at send()
time.
Task-number: QTBUG-67337
Change-Id: I8235f6ef407adc3eaeeff4eee72238ba6750afb2
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Valery Kotov <vkotov@luxoft.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently the "qml: " prefix to strings output via console.log() is not
reliable. We can also get "qml <function> - ", as seen in the test log.
Also, increase the timeouts. The test log indicates that they are too
small.
Change-Id: Icb0da329e52273f9300504047b79b1ad41c02892
Task-number: QTBUG-67505
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
We can apparently catch the engine at a point where it has already
registered but not compiled anything.
Change-Id: I09cd7fefe731a61a6f2095e125516ecf57c602cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Record errors that happen during QV4::Script::parse() time in the same
way as we record errors during binding evaluation, in order to correctly
set the error state of QQmlExpression. This also removes dead code about
setting line, description, etc. which is taken care of by
ExecutionEngine::catchExceptionAsQmlError.
Task-number: QTBUG-67240
Change-Id: I2d586e16803d0883cdd2d1d262b4c67202c00562
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
| |
Map spaces to underscores as well.
Task-number: QTBUG-54683
Change-Id: Id73c086a2845111623df631c06733ba2b42249e0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
|
|
|
|
|
|
|
| |
Ensure a quoted path when constructing the command line for rcc -list.
Change-Id: I43e31015e3de58f65f46d2e594cb362d71b123ed
Task-number: QTBUG-57758
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
|
|
|
|
|
|
|
|
| |
Perform not only a build test when running the cmake tests, also run the
resulting testlib based binary to verify the toolchain end to end.
Change-Id: Ic962edf10b810b36f3feb68df55e7230841865d6
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-67354
Change-Id: I7251095570d5ba8d0a62d854cfcbc339b2455747
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The environment change was too fragile. If the JIT ran before the
relevant test function was executed, it would set the doProfile flag to
false, and never re-evaluate the environment variable. The qmljs binary
is only available for private tests, and the test didn't quite fit into
qjsengine anyway. Therefore a new test for the QV4Assembler class that
genertes the map files is added.
Change-Id: Ice0c18daaee9f0f4f0f15eba0261bcc01aa4b105
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
If we don't wait for anything else, we need to wait for at least the
"trace started" message before we disable profiling. Otherwise we might
disable the profiling before the first engine registers, which will give
us no trace at all.
Change-Id: I9fb64e82bd05c60640ffbbd2ece5e99edfa97f4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 86702c3be53fda404ebe331207f9062675c952e0 and
e2218f8b5c527a6da52ae4dc8a381b3ff68d3cd0 were submitted directly to the
5.9 and 5.6 branches. As the problem does not exist per-se in 5.11 there
is no fix required. This commit only adds the test coverage for this
issue to avoid regressing.
Change-Id: Ic5f5d56f52f3855d20755f771804025f8a93acd9
Task-number: QTBUG-66832
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
| |
Extend 22b13921f8067f8a93164875a4ad59bed85b0400 to SignalTransition.
Change-Id: Ic7d03353efaa7ba894b913e5b0bc193d648d21df
Task-number: QTBUG-50328
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Calling QQmlListModel::append() with an empty JS array triggers an assert
in QAbstractItemModel::beginInsertRows() because it's called with
negative "last" parameter.
Change-Id: I202da260d79f2e6677c663c5785ff754c715fef8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We must also do version checking for QML and JS files that were compiled
ahead of time and are embedded in resources. If the lookup for the
original source code fails, then we must generate an appropriate error
message.
As an upside we get better error reporting when trying to load an empty
file and Qt.include() now reports the error message in the statusText
field.
The error reporting for imported scripts was not changed as importing an
empty script is (oddly) allowed.
Task-number: QTBUG-66986
Change-Id: Ie0ef81af371a51ecf8c66ae7954d43f5cc6c12de
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two ways to use function expressions on the right-hand side
of bindings:
property var somethingPressed
somethingPressed: function() { /* ..press something else.. */ }
signal buttonPressed
onButtonPressed: function() { /* ..handle buttonPress.. */ }
In the former case, it declares a property that holds a function. So on
initialization, the right-hand side of the binding returns a closure
that gets assigned to the property 'somethingPressed'.
In the latter case, the signal handler is explicitly marked as a
function for clarity. So, the handler should not be returning the
closure, but the handler should *be* the closure.
In general, it is not possible to detect if the left-hand side is a
property or a signal handler when generating QML cache files ahead of
time. So for this case, we mark the function as only returning a
closure. Then when instantiating the object, we check if it is a signal
handler, and if the handler is marked as only returning a closure. If
so, we set that closure to be the signal handler.
Task-number: QTBUG-57043
Task-number: QTBUG-50328
Change-Id: I3008ddd847e30b7d0adef07344a326f84d85f1ba
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We support simple object bindings such as
someProperty: Rectangle { ... }
when the type of "someProperty" is QVariant, but we produce an error
when it's QJSValue. There is no good reason for that, and the fix for
QTBUG-67118 requires this.
Change-Id: Ia5dc88749bcba0b5c781a6ab2b4a9fb92299e0ac
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This change reverts 8740f35e69 and 8ef46910fc.
The qtestlib limitation was fixed by b3e91b66b9175c1c3ff5f73f3ac231f74f9bf932
Task-number: QTBUG-63957
Change-Id: I2e12b1eff25c5ea8005db0893477a9732f24d211
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
In some cases, when our simple array data had an offset and
data would wrap around, ArrayData::append would write out
of bounds data into the new array, leading to crashes.
Task-number: QTBUG-51581
Change-Id: I55172542ef0b94d263cfc9a17d7ca49ec6c3a565
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
You can create further objects while the QML engine is being destroyed.
The debug service is not interested in those because they will be rather
short lived anyway.
Task-number: QTBUG-62458
Change-Id: If5395ef058268e0e956d159bc636495da1c0c98f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
We want to be able to generate perf map files for JITed code.
Task-number: QTBUG-67056
Change-Id: I56899e1dbf184083d94efe926d21fca4f9ea1e18
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
We have to explicitly specify the "this" object on QV4::Function::call,
otherwise it will assume undefined or the QML global object.
Task-number: QTBUG-66942
Change-Id: I1af7742b4fee1b49e9760a413834daf3edb15d74
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Ask expected, this passes currently. The this object is set to the scope
object in QQmlJavaScriptExpression::evaluate, which
QQmlBoundSignalExpression::evaluate calls.
Task-number: QTBUG-66942
Change-Id: I16a709768f9c798910377a52b5e882bb6d554a5f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given the following expression
var x = MySingleton.MyEnumValue
where MySingleton is a QML (composite) singleton and MyEnumValue comes
from a QML declared enum, we had code in place up to (and including)
5.10 to attempt to optimize that expression to a enum constant at
compile time. In 5.10 that optimization does not exist anymore. In <=
5.10 we would also skip the optimization under certain circumstances
(too many statementes, etc.). The fallback that is in place for handling
this at run-time tried to be smart by avoiding the
QQmlContextWrapper::get lookup and return straight a reference to the
singleton as QObject. That works for regular property lookups, but it
fails when trying to look up something like an enum, that isn't a
meta-object property.
Change-Id: I1819b9d8ae06a3f595e067bf5b018c4065be76bb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 2eb2d6386da304cd1164264ae0bff685c796d89c, deactivating/clearing the
loader would now prevent any subsequent bindings from being evaluated.
The problem there was that the item created by the loader wouldn't have
a parent item (among things) anymore, so references to it in the
bindings would result in errors.
The way to prevent it was done by invalidating the context of the item,
which in turn would detach it from the root context. This is a problem
if objects in the root context are referenced after
deactivating/clearing the loader:
onSomethingChanged: {
loader.source = ""
objectInRootContext.doIt()
}
This would result in a ReferenceError when resolving objectInRootContext
and break the behavior present before the fix mentioned above. The
correct way is to recursively clear the context set on all bindings, but
leave everything in place. This way, no subsequent bindings will be
evaluated, but the currently "running" scripts will still be able to
reach the root context.
Task-number: QTBUG-66822
Change-Id: Ic9c2ab0a752093a26967da4783cb4c29cf83d2ca
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|