| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
refs/staging/dev
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
tests/auto/qml/qjsengine/tst_qjsengine.cpp
Change-Id: I25e264df273c01832f64dbd31923d8529f1d1900
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ib65bb9edbcbd1172cc620243b078c9691d961828
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This syntax allows creating distinct .qrc files without having to
create them manually.
Change-Id: Iab7c76fd162bb7f39b42fb983f85d74fce3036d4
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Qt Quick is most often used via its QML types, and since some of the
tips on this page are not specific to Qt Quick but apply to QML in
general, it makes sense to list them both on the same page for
convenience and completeness.
Change-Id: I6d61b98ffd7e52dc28b33ef00a78dd745f39820a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This page doesn't offer much on its own, and qtquick-bestpractices.qdoc
is already starting to gather useful guidelines, so move its contents
there. Having everything related to best practices/guidelines on one
page means less clicking between these "overview" pages, which I think
is a bit of a problem currently.
Change-Id: I18316dc177a6a7eb5a031e178cd0aed31dfa63ae
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't just include the "compile hash" of QtQml in the dependencies hash
of QML files but use a dedicated field in the data structure, that we
will also fill in when generating cache files ahead of time.
This ensures that AOT generated cache files are considered invalid even
when switching between different sha1s of declarative.
Task-number: QTBUG-66986
Change-Id: I3d8ee103fd1a33a5b4c4576b3a2703fcd09712dd
Reviewed-by: Erik Verbruggen <erik.verbruggen@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>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0d36e009b4551e45e5e7fda6c95fc3fbfabfe1a5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't need to mention specific challenges in the introduction.
Change-Id: I03eec5fe543fbf0b1859850424eba8cfa9f134a5
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Start off with the "direct" syntax, as that's the most
straight-forward. Then, explain why it can be inefficient and introduce
the concept of separate .qrc files.
Change-Id: I63c2c3e188db04ed58e816f7e69ab98a42196ff1
Reviewed-by: hjk <hjk@qt.io>
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>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I3ba63110a3674675f44feca51ba98128844e1904
Reviewed-by: Simon Hausmann <simon.hausmann@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 must protect various resources in the type loader with our existing
lock. The QQmlTypeLoaderQmldirContent is now value based, so that we can
release the lock on the shared cache early. Copying it involves
adjusting the refcount of the QHash and QString instances in the
QQmlDirParser.
The safety of this was verified with a TSAN build and the example
supplied in the task. It crashed reliably with TASN errors first and
with this patch it runs without errors.
Task-number: QTBUG-41465
Change-Id: I616843c4b8bdfd65d1277d4faa8cb884d8e77df8
Reviewed-by: Lars Knoll <lars.knoll@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>
|
|/ /
| |
| |
| |
| |
| |
| | |
All known clients support multipackets by now.
Change-Id: I74f017f5e11b01ee967fcfb5cecfefa54aad8ef7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This way we can observe it from the outside and drop all the code that
genrated extra signals from the virtual method.
Also drop the unused QQmlDebugTestService::stateHasChanged signal to
reduce the confusion.
Change-Id: Ia37c1eaf8b392e594b0931694f43f84fe09b000c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I2e3ba907a6afcaa69354a894259c7b7accf3e3ac
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow pulling the shared mutex out of the QQmlThread for the type loader
so that the lock and unlock calls can be inlined. We do a lot more of
those now.
Task-number: QTBUG-41465
Change-Id: I42f3d17feb08863f51b003b061d89f49c5a6d574
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Icc86afe67fd5a432798ce3173da51275bed1bf64
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I7e9e09ba3b6c0ec3c0b4bed75b24ed87fbe9660f
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A trackpad is primarily a mouse-emulating device, which can also
recognize gestures, and furthermore can send raw touches iff it
is asked to. So, every touch event from a trackpad is likely to be
followed by a mouse or gesture event (especially when the
MouseEmulation capability confirms that it is able to do that).
Therefore mouse event synthesis is redundant.
In this bug scenario, MultiPointTouchArea enables touch events within
its rectangular bounds. A Flickable is on top. As you flick with
two fingers on the trackpad, macOS sends touch events with two
touch points (because MPTA enabled touch events) and also a series
of QWheelEvents as it recognizes the flick gesture. The Flickable
receives mouse events sythesized from one touch point, and reacts
as if you were dragging with one finger on a touchscreen, while it
simultaneously also reacts to the QWheelEvents. Meanwhile the
remaining touchpoint falls through to the MPTA underneath; so the
user ends up interacting with both at the same time and making
the Flickable jump around besides. This patch just fixes the
jumpiness in Flickable: it will no longer receive the synth-mouse
events, so it will not be dragged, and will react only to the
wheel events. But MPTA still gets the touches.
Task-number: QTBUG-66329
Change-Id: I6f535a2c9e47bcb284eaf9ae1fdaa39f8b510af9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I47e84ee2c3f36dae9354e54b68ac60001703bf3d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since SVG images can be scaled up without any loss of quality then we
should allow this to happen even though it is not done for other image
formats. This restores the 5.9.x behavior for SVG images.
Additionally the manual test is updated to showcase an embedded image
inside a SVG one to indicate this is continuing to work as before too.
Task-number: QTBUG-67019
Change-Id: Ia719899937f8146e8fab50aa85adf18e2f79aa98
Reviewed-by: Evangelos Foutras <evangelos@foutrelis.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I98ef98ca603a1d82f944973a06375e65192fdab2
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the property being queried is an array index, we would call
ArrayData::getProperty with a the Property pointer being null. We
correctly handle this for named properties, but didn't here.
Change-Id: Iba98a13f276432f273545c87cfc998fe64f45c51
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-15757
Change-Id: I9193ed459ced63cceb819a66f5a8c76042f455b6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie3c24958e96c54cd91cd4a752638c11764338028
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-67007
Change-Id: Id32cc14ea1bc258cfc139a859ccae014f5893563
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The findclasslist.pl perl script that produces the linker version script
got confused by the "struct name" that was part of a macro and thought
that the class "name" in the *_p.h was supposed to be annotated with the
private API tag, resulting in a "*4name*" mask in the linker script,
which in turn made lots of public symbols "private" that had name in it,
such as QQmlProperty::name(). Fixing the indentation works around it and
conforms to coding style.
Change-Id: I0c66a6bb1d49941d6ec6dd89d9433d9b6ae0c639
Done-with: Thiago Macieira <thiago.macieira@intel.com>
Task-number: QTBUG-67004
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|\|
| |
| |
| | |
Change-Id: I6b2568337c09ff98850b4ecccccc9a8fc25064cd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With the QV4::Moth::BytecodeGenerator::Jump type we are relying on the
compiler doing a return value optimization. That however is not required
by the C++11 standard and the GHS compiler does indeed not do that here,
resulting in a ~Jump destructor call in the following sequence _before_
link() is called:
Jump generateJump() { ...; return Jump(...); }
...
generateJump().link();
The destructor however verifies that link() was called, which fails.
Fix this by making Jump a move-only type, which the compiler will issue
if it doesn't perform a return value optimization.
Task-number: QTBUG-66917
Change-Id: I97cc9a5d7f97d61e573ad8bc309cf48ab18eb25d
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When an alias points to a child object which has not yet been
initialized, it's id won't have been registered yet, so setting up a
binding to it will result in a crash.
The fix is: when setting a binding target fails, and its target property
is an alias, queue them until all bindings have been set up, and try
again.
Task-number: QTBUG-57041
Change-Id: I4dc5a6d25c0a32fed9fd952c955e2006c76be45a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Given two simple bindings in this order
property int firstVar: secondVar
property int secondVar: ...
then the binding expression for "secondVar" ends up being evaluated
twice at run-time. The first time happens when enabling the binding
expression for "firstVar", which results in the engine detecting that
there is a dependency onto another binding that has not been enabled
yet. This is when QQmlData::flushPendingBinding(Impl) enables the
expression for secondVar and does an initial evaluation. Afterwards the
QQmlObjectCreator continues enabling the next binding in ::finalize(),
which will end up evaluating secondVar a second time, unnecessarily.
We can detect this case inside setEnabled and only call update() if we
transition from disabled to enabled state. This should also cover the
case of bindings created and assigned dynamically through QtQuick
PropertyChanges / States, as those call setEnabled(false) before
removing the binding (to replace it with something else) and
setEnabled(true) when reverting the state (in
QQmlPropertyPrivate::setBinding).
Change-Id: I447432891eabff2c4393f5abfee1092992746fa0
Task-number: QTBUG-66945
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
This lead to quite a few valgrind warnings in test cases.
Change-Id: Icef0fc5f93a68e4fe67e1ecd4755b456ad4778a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
gcc 7.2 gives tons of warnings of the form:
./3rdparty/masm/wtf/Assertions.h:186:1: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
In practice the marco expansion to (defined FOO && FOO) can safely
be reduced to simply FOO, as #if FOO will expand to #if 0 if FOO
is not defined.
Change-Id: Idc1b09990725b99bbfa2c3bc949565254ea4174f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We shouldn't allocate objects that are larger than the size of
a standard memory segment through the chunk allocator, as this
can lead to problems when freeing the segment and then re-using
it again.
Instead allocate a private MemorySegment for these objects, and
free it when the object gets garbage collected.
Task-number: QTBUG-66732
Change-Id: Ic24ff65d204977f313ab0adaf7a8132883e525f0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QQmlData is shared between engines, but the relevant QObjectWrapper is
not.
Since 749a7212e903d8e8c6f256edb1836b9449cc7fe1 when a QObjectWrapper is
deleted it resets the shared QQmlData propertyCache.
ab5d4c78224c9ec79165e8890e5f8b8e838e0709 fixed this situation for
bindings, however we would still hit effectively the same crash in the
same situation if a function is evaluated before a binding.
Change-Id: I20cd91cd8e31fd0176d542822c67e81a790599ba
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When declaring bindings within a group property and that group property
itself is a locally declared alias, then by the time we try to determine
property caches for the group property we will fail as the aliases
haven't been resolved yet.
To fix this we can keep track of such group property declarations
(encapsulated in the QQmlInstantiatingBindingContext that has all we
need) and after we've resolved the aliases (added them to the property
caches), we can go back and fill in the entries in the propertyCaches
array for the group properties.
Task-number: QTBUG-51043
Change-Id: I5613513db3977934bcc51a3df530de47d57326f9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we're run from a top-level evaluate() call from the JS engine, then
let's assume that any created components are top-level components that
belong to the root QML engine context. This is not quite a typical
use-case, but our API allows for this and this seems like an easy and
sensible solution.
Task-number: QTBUG-66792
Change-Id: Ic1c9171c257e8e60c0b2c43f9194bd038744ed2d
Reviewed-by: Oleg Yadrov <oleg.yadrov@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
| |
| |
| |
| |
| | |
Change-Id: I81aa96641d9bef35e003b67e691607a926c087d7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When initializing a QQmlProperty with the following syntax:
QQmlProperty property(root, "testType.objectName", QQmlEngine::contextForObject(root));
only try to look up types (for each token after splitting on the '.')
if the token starts with an uppercase letter, as 1e350a8c now enforces
that type names begin with an uppercase letter.
Task-number: QTBUG-66715
Change-Id: Iab64be1deb971dca256fc65d358c773837222a57
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I55adc9c261529ee4b88fbb5591b3955e396437a8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|