Gunnar Sletta [Fri, 4 Oct 2013 13:42:35 +0000 (15:42 +0200)]
Several smaller fixes to Animators.
Backwards animations are not supported for animators as the
animation system cannot handle uncontrolled backwards animations.
Make sure we write back values only for the animators that have
run at all.
Clockwise rotation to 0 can easily end up on 360 as a result
the _q_interpolateClockwise function not being entirely correct.
Change-Id: If69b8555a1361f46600a40e80419b65438c18097
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Robin Burchell [Mon, 7 Oct 2013 23:23:15 +0000 (01:23 +0200)]
Delay calculation of offline storage path as long as is practically possible.
This avoids calculating it incorrectly in the case that something later clobbers
argv, such as a zygote or booster-type mechanism.
Change-Id: Ifab16c7c94e9ee3fded0dfda2266a12c910858ee
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
J-P Nurmi [Mon, 7 Oct 2013 09:43:59 +0000 (11:43 +0200)]
Fix qquickframebufferobject.h syncqt warning
QtQuick: WARNING: qquickframebuffe robject.h includes QQuickItem when
it should include QtQuick/QQuickItem
Change-Id: Ia702bab8881ade601693cbee495b1dc6a5e14abb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Thiago Macieira [Fri, 4 Oct 2013 04:54:18 +0000 (21:54 -0700)]
QStringRef has toInt(), so no need to create a new QString
Saves up on memory allocations.
Change-Id: I0f7c82521b0b10085861fc62fed9b9d591169b5a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Friedemann Kleint [Fri, 4 Oct 2013 08:28:23 +0000 (10:28 +0200)]
Reshuffle inlined functions to fix MinGW-warnings.
When compiling QtQuick:
qv4value_p.h:80:17: warning: 'QV4::Managed* QV4::Value::asManaged() const'
redeclared without dllimport attribute after being referenced with dll
linkage
^
qv4value_p.h:180:14: warning:
'static QV4::Value QV4::Value::fromManaged(QV4::Managed*)' redeclared
without dllimport attribute after being referenced with dll linkage
^
qv4value_p.h:285:16: warning:
'QV4::String* QV4::Value::asString() const' redeclared without dllimport
attribute after being referenced with dll linkage
Change-Id: I548a2f8049b8eca06ab1061f56416a332820dc01
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Michael Brasser [Fri, 4 Oct 2013 02:14:08 +0000 (21:14 -0500)]
Fix regression in pressDelay behavior.
Don't deliver a press event when a Flickable is moved before
the pressDelay expires. This prevents delegates flickering
between pressed and unpressed states when beginning to
flick a Flickable.
Fixes regression introduced by
429af6244518172e19abf7fecd7112f26bac6b31/
d02131e743597b9bd3070d986c61a1c91ea8317a.
Task-number: QTBUG-31168
Change-Id: Id4e853fabe99000837df3681acd8fc4e76d2e9b3
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Gunnar Sletta [Fri, 4 Oct 2013 08:39:20 +0000 (10:39 +0200)]
Respect DirtyForceUpdate in QSGBatchRenderer.
There is a way this could have been done slightly more efficitently.
If we moved all "combined" logic out of the scene graph and into the
Node shadow tree, we could ignore the forceupdate all
together. However, this is a quite large change for what is currently
a non-common case. It would also increase overall memory consumption a
bit as we would have superfluous combined matrix and opacity in the
QSGNodes.
Task-number: QTBUG-33838
Change-Id: I06c486ace2be15bef1f1dc72a8b41cb649d7c813
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Erik Verbruggen [Wed, 25 Sep 2013 13:16:39 +0000 (15:16 +0200)]
V4 JIT: enable register allocator for linux/x86.
Change-Id: I9424838139a419beb2e207f168fc25c0c47c64e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Wed, 25 Sep 2013 13:17:16 +0000 (15:17 +0200)]
V4 JIT: fix visitRet for 32-bit architectures.
Change-Id: I004fe8d5de0f5a932c23393ed06a04738b8e8bf1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Petr Nejedly [Fri, 4 Oct 2013 05:18:54 +0000 (22:18 -0700)]
Signal no region descriptors follow the ETH table.
In our implementation, the 2-word EXIDX is directly followed
by a 3-word ETH for personality 2 unwind interpretter.
According to ARM EHABI 9.2, "region of interest" descriptors
should follow, finished by a single zero word.
As the generated functions don't have any such regions,
only the closing zero needs to be present.
Change-Id: I65fde548371cf12a31aac3e8829275965e034f3a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Thu, 3 Oct 2013 07:01:51 +0000 (09:01 +0200)]
Make sure to markDirty the node from UniformAnimator.
Failure to do so will not repaint scene graphs which only
has changes from the animator.
Change-Id: Id420775d704df17379ca9b0eecd543fd3829fd00
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Gunnar Sletta [Thu, 3 Oct 2013 06:52:39 +0000 (08:52 +0200)]
Make sure we apply the last transformation step.
Change-Id: Ie9b9a04cf41033bb475875f419b16ce91f6a477d
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Gunnar Sletta [Thu, 3 Oct 2013 07:00:08 +0000 (09:00 +0200)]
Make transform and opacity animators work when layer.enabled: true
Change-Id: I6d9ece93a75782d524c211fc81a43f4311a38571
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Gabriel de Dietrich [Thu, 3 Oct 2013 15:04:40 +0000 (17:04 +0200)]
Remane private QQuickAction into QQuickStateAction
This avoid symbol conflicts when statically linking with Qt Quick
Controls, that has its own QQuickAction class and which may become
public some day. (QQuickPropertyAction might be a more apt name, but
it's already taken).
Change-Id: Ia9514d63d38295603a89d8ec5a88815a651380f7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Jan Arve Saether [Wed, 2 Oct 2013 13:21:10 +0000 (15:21 +0200)]
Don't print garbage or crash when using console.log
The problem was that the ctor of QMessageLogger did not make a deep
copy of the source or the function. Since the QByteArray returned from
toUtf8() was only guaranteed to live within the statement it was used,
the pointers that QMessageLogger held would point to released memory as
soon as the QByteArray got destructed.
This could only be reproduced if the logging framework tried to print
the source file or the source function.
In my case, I had set this environment variable to provoke this:
$env:QT_MESSAGE_PATTERN="%{file}(%{line}):%{message}"
Change-Id: I4ea4cf309c6c6420cef5bab0108a6cb2b2f9e841
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Shawn Rutledge [Tue, 1 Oct 2013 07:01:35 +0000 (09:01 +0200)]
A dynamically-created Window can have a parent Item and vice-versa
There can be a QML-declared Item which uses Component.createObject to
instantiate a Window; in that case the Window will be transient for
the window containing the Item. There can also be a QML-declared
Window which uses Component.createObject to instantiate an Item;
in that case the Item's parent will be set to the Window's contentItem.
Task-number: QTBUG-33644
Change-Id: I0b1fe2e98c862c100e52bd5952788af3a727d25e
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Shawn Rutledge [Tue, 1 Oct 2013 06:36:03 +0000 (08:36 +0200)]
A dynamically created Window can have a parent Window
So far the parent relationship has existed only for Items. parent
is still not exposed as a property of Window, but since it was possible
to give a parent parameter to Component.createObject(), it makes
sense to try to interpret it as a Window in that case. So now a
Window can be created with another Window as its parent just as an
Item can be created with a parent Item.
Task-number: QTBUG-33644
Change-Id: I796198a38bd47253eef462c80f5098825451c59c
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Gunnar Sletta [Wed, 2 Oct 2013 10:58:42 +0000 (12:58 +0200)]
Invalidate the bounding rects when the roots change.
When roots change, matrices are updated in the nodes, so
we need to also invalidate the bounding rects for geometry
nodes.
Change-Id: I61f60ad069c3b1d018ce31c57310a1e5c4807684
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Tue, 1 Oct 2013 18:15:46 +0000 (20:15 +0200)]
Respect Qt.vector2d as input to ShaderEffect uniforms.
Change-Id: I7c24f822424d36cf16648d17df161f15083b0da5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Tue, 1 Oct 2013 07:11:54 +0000 (09:11 +0200)]
Mark DirtySubtreeBlocked correctly from OpacityNode
In the edgecase where the opacity was exactly the OPACITY_THRESHOLD
we would fail to mark the tree as dirty. This led to a crash
in the renderer.
Change-Id: I618910d0c792a215133598b6a87217be1f8729bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Mon, 30 Sep 2013 13:33:57 +0000 (15:33 +0200)]
Animator overview docs and example.
Change-Id: If0852e48dbbfea4fadca9c897ea0e62393763055
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Gunnar Sletta [Thu, 3 Oct 2013 11:16:10 +0000 (13:16 +0200)]
Separate and fix 8/24-bit text mask materials.
The logic was a bit cluttered, trying to handle two rather
different pieces of logic in one material shader. The 8-bit
shader does not try to be fancy in any way, it just takes the
alpha * color which gives similar intensities as the distance
fields. The logic for 24-bit contains a tiny fix for opacity.
The patch also includes a change from QColor -> QVector4D and
QPointF -> QVector2D to simplify the conversion needed and
be consistent with what kind of types we use.
Task-number: QTBUG-33805
Task-number: QTBUG-33633
Task-number: QTCREATORBUG-10176
Change-Id: Ia8c464f98a1fc2c190a1d323fc21466a4d7b0dfd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Mon, 30 Sep 2013 11:18:10 +0000 (13:18 +0200)]
Remove QSGContext's precompilation step.
Materials are managed solely inside the renderer now, so these
are just wasting time.
Task-number: QTBUG-33456
Change-Id: Ie320df20b7971633c257b1bd3a218e7d70e52c3d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Gunnar Sletta [Mon, 30 Sep 2013 11:19:30 +0000 (13:19 +0200)]
Enable profiling of materials and atlas textures
Task-number: QTBUG-33459
Change-Id: Ie9ea176fbb7ee46a128b4bf66a8f4475a5d4c90b
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Petr Nejedly [Tue, 1 Oct 2013 06:23:25 +0000 (23:23 -0700)]
Get lookups working (somehow) on ARM
Edit(Simon): This is a workaround for the register clash on ARM. r0
(ReturnValueRegister) is also used to pass the first argument, therefore we
can't use it as "temporary" register for the duration of the parameter setup.
Temporarily allocate r8 for now until we have constraints like these properly
propagated into the register allocator.
Change-Id: Iae266672856dea247b720367b8e8393333622e4e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 2 Oct 2013 18:43:25 +0000 (20:43 +0200)]
Temporarily disable libunwind exception throwing on Mac
The run-time appears to have a slightly different behaviour wrt exception
ownership. We don't strictly need this code path on Mac, so use regular C++
exceptions until I can figure out what happens there.
Change-Id: Idd540c8656d25ffdb4002843f398114881e33214
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 1 Oct 2013 14:34:21 +0000 (16:34 +0200)]
Fix backtrace generation on Android/ARM/QNX
Use a GCC extension to the common C++ ABI's called _Unwind_Backtrace, which
generate backtraces if possible. Its direct use will ensure we use the
statically linked unwind, which knows about our unwind tables. This also helps
for the setup when libc doesn't have the glibc specific backtrace() function we
used previously. The unwinder on Mac OS X with clang also implements the same
extension.
Change-Id: I0b780590c10c16e50ec570f7da1efae2e64c46dd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 1 Oct 2013 14:19:28 +0000 (16:19 +0200)]
Cleanup exception handling
The code in the Exception class operates entirely on the engine's data,
so move it into ExecutionEngine instead. This eliminates the need for
a QV4::Exception class and catches and old code that tries to still do
catch (Exception &) instead of catch (...)
Change-Id: Ie608bec6af652038aca6c9423c225a4d7eb13b39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 1 Oct 2013 13:10:33 +0000 (15:10 +0200)]
Change v4 exceptions to use the common C++ ABIs foreign exceptions
On platforms where we use the common C++ ABI, throw the exception not using a
dummy C++ exception structure and the throw keyboard, but instead use the
lower-level _Unwind_RaiseException to throw a foreign exception. It is caught
with the existing "catch (...)" and re-throw is implemented similarly, by
grabbing the current exception from the globals (a standardized data structure)
and re-throwing it.
On platforms such as ARM that lack hooks for supplying our unwind tables to the
system run-time, this patch will make it possible to link the unwinder
statically into libQtQml (libgcc or libunwind) and thus force it to use our
unwind tables, because throwing or re-throwing will always go through our
statically linked code through direct calls to _Unwind_RaiseException (instead
of libstdc++).
Change-Id: Ic2ac056fc7ed9e93fb51e30ab45f35b260487c5f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Friedemann Kleint [Mon, 30 Sep 2013 13:58:05 +0000 (15:58 +0200)]
Fix warnings in tst_qquickaccessible.
tst_qquickaccessible.cpp: In function 'int verifyHierarchy(QAccessibleInterface*)':
tst_qquickaccessible.cpp:70:27: warning: variable 'middleChild' set but not used
tst_qquickaccessible.cpp: In function 'QAccessibleInterface*
topLevelChildAt(QAccessibleInterface*, int, int)': tst_qquickaccessible.cpp:325:46:
warning: suggest parentheses around assignment used as truth value.
Change-Id: I80f9a1e5438279add3671828a3145af2b1f2abf8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Friedemann Kleint [Mon, 30 Sep 2013 13:52:38 +0000 (15:52 +0200)]
Forward-declare QV4::String in qqmlmetatype_p.h.
Required for follow-up changes reordering inline functions for
MinGW as otherwise QV4::Value::isString() is reported as
used but not defined.
Change-Id: Ib07caa9eee667295ecc88f94ab8960b100cd084b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Friedemann Kleint [Mon, 30 Sep 2013 13:58:05 +0000 (15:58 +0200)]
Fix warnings in tst_qquickaccessible.
tst_qquickaccessible.cpp: In function 'int verifyHierarchy(QAccessibleInterface*)':
tst_qquickaccessible.cpp:70:27: warning: variable 'middleChild' set but not used
tst_qquickaccessible.cpp: In function 'QAccessibleInterface*
topLevelChildAt(QAccessibleInterface*, int, int)': tst_qquickaccessible.cpp:325:46:
warning: suggest parentheses around assignment used as truth value.
Change-Id: I80f9a1e5438279add3671828a3145af2b1f2abf8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Friedemann Kleint [Mon, 30 Sep 2013 13:52:38 +0000 (15:52 +0200)]
Forward-declare QV4::String in qqmlmetatype_p.h.
Required for follow-up changes reordering inline functions for
MinGW as otherwise QV4::Value::isString() is reported as
used but not defined.
Change-Id: Ib07caa9eee667295ecc88f94ab8960b100cd084b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Tue, 1 Oct 2013 07:11:54 +0000 (09:11 +0200)]
Mark DirtySubtreeBlocked correctly from OpacityNode
In the edgecase where the opacity was exactly the OPACITY_THRESHOLD
we would fail to mark the tree as dirty. This led to a crash
in the renderer.
Change-Id: I618910d0c792a215133598b6a87217be1f8729bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Friedemann Kleint [Mon, 30 Sep 2013 13:52:38 +0000 (15:52 +0200)]
Forward-declare QV4::String in qqmlmetatype_p.h.
Required for follow-up changes reordering inline functions for
MinGW as otherwise QV4::Value::isString() is reported as
used but not defined.
Change-Id: Ib07caa9eee667295ecc88f94ab8960b100cd084b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Tue, 1 Oct 2013 07:11:54 +0000 (09:11 +0200)]
Mark DirtySubtreeBlocked correctly from OpacityNode
In the edgecase where the opacity was exactly the OPACITY_THRESHOLD
we would fail to mark the tree as dirty. This led to a crash
in the renderer.
Change-Id: I618910d0c792a215133598b6a87217be1f8729bc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Gunnar Sletta [Tue, 1 Oct 2013 18:15:46 +0000 (20:15 +0200)]
Respect Qt.vector2d as input to ShaderEffect uniforms.
Change-Id: I7c24f822424d36cf16648d17df161f15083b0da5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Lars Knoll [Wed, 2 Oct 2013 13:14:45 +0000 (15:14 +0200)]
Use a QVector instead of a QList
This makes the code go quite a bit faster (saves ~7-8% of the
total amount of instructions executed when running crypto.js
Change-Id: I6b3bd08eca98b45593262e2fc6e0ce5056257e76
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Tue, 1 Oct 2013 12:53:05 +0000 (14:53 +0200)]
V4 JIT: implement convertUInt32ToDouble on ARMv7.
Change-Id: I11caf07a8776bb2c6527639f22d47103f4ca1cef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Tue, 1 Oct 2013 11:12:52 +0000 (13:12 +0200)]
V4 IR: fix dead-code elimination.
Change-Id: If00a108fb107d331478dd36ad7feae4c4521c2ae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Wed, 2 Oct 2013 12:41:35 +0000 (14:41 +0200)]
V4: invert conditions when the true block follows the test.
Change-Id: I5044acd4263b71734e4eb5d7e74b1a4a8414741e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 11 Sep 2013 11:23:21 +0000 (13:23 +0200)]
Change exception handling API
This patch changes the exception handling API in the engine slightly, encapsulating
any use of direct throw statements and catch blocks with concrete types. In the future
we need to be able to change the way these are implemented, in order to ensure that
the correct stack unwinding code is triggered for throw and re-throw.
This patch separates the C++ exception object thrown from the V4 exception
(that includes value, throwing context pointer) and stores the latter inside
the engine.
In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to
move into the QV4 namespace directly.
In addition the syntax for catching exceptions changes from
try {
...
} catch (QV4::Exception &ex) {
ex.accept(context);
QV4::ScopedValue exceptionValue(scope, ex.value());
}
to
try {
...
} catch (...) {
QV4::ScopedValue exception(scope, context->catchException());
}
Context::catchException() checks if there's a "current" exception in the engine,
and if not assumes that we caught an unrelated exception and consequently re-throws.
partiallyUnwind() is also gone and replaced with rethrowException(), in order to
encapsulate the re-throw.
Lastly, in the future nesting try/catch blocks isn't going to be possible due to
limitations in the common C++ ABI with regards to foreign exceptions.
Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Tue, 1 Oct 2013 14:11:55 +0000 (16:11 +0200)]
Cleanup API of Safe<T>
Don't have an implicit cast operator to Returned<T>
anymore, and return a T* from the operator->()
Change-Id: If4165071b986bfc84a157560d94d39c2dcfbc9e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 30 Sep 2013 20:41:12 +0000 (22:41 +0200)]
Use SafeValue instead of Value in ScopedValue methods
Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 30 Sep 2013 18:57:57 +0000 (20:57 +0200)]
Remove some more uses of QV4::Value
All remaining uses should be GC safe now.
Change-Id: I05c962de6ab896f108f70caa1bf937a24e67bfe1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 30 Sep 2013 13:41:24 +0000 (15:41 +0200)]
Remove more uses of Value
Change-Id: I889e760f75b485a28e1f2a2c26b2337ae9bfafac
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 30 Sep 2013 11:48:05 +0000 (13:48 +0200)]
Fix ObjectIterator API to be GC safe
Change-Id: I3a9c48d53d8dbadcb9b32c00fcef1f89447c4b8c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 2 Oct 2013 06:13:58 +0000 (08:13 +0200)]
Don't create a ValueRef to a temporary
Change-Id: I6d7fbcee594298517b880e4b0fac9df1f9e54d61
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Albert Astals Cid [Thu, 26 Sep 2013 08:56:03 +0000 (10:56 +0200)]
Always call callCompleted in QQmlDataBlob::tryDone
We need this since it could happen that in QQmlComponentPrivate::loadUrl we did
QQmlTypeData *data = QQmlEnginePrivate::get(engine)->typeLoader.getType(url, loaderMode);
and got a sync QQmlTypeData even if we asked for async, and thus the async loader was never notified
when it finished and we were never loaded.
Situation in which this can happen is:
* ListView with an async Loader as delegate
* Loader loads two items A and B, while A is a B
* Item 0 of the ListView triggers an async loading of A that triggers the sync loading of B
* Item 1 of the ListView triggers an async loading of B
* Since B is already being loaded (though in sync), we just add ourselves to the people that want to be notified
* sync loading of B is done and QQmlDataBlob::tryDone does not call the callbacks because it's sync
* Item 1 is never finished loading
Change-Id: I52a0979a1d3cfcfe73a71196bf24f491d6cf8e9a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Tue, 1 Oct 2013 15:44:54 +0000 (17:44 +0200)]
V4 IR: fix type inference.
When a phi-node couldn't be fully typed (e.g., when one of the temps
was not yet typed), VarType was assumed. When a circular dependency
between two phi-nodes occurred, like with a condition inside a loop,
then depending on the ordering of the work-list, the two phi-nodes
could start oscillating between VarType and the correct type.
The fix is to check if one of the temps is not fully typed, and if so,
assume whatever we currently have as the result and have the statement
re-scheduled. Full typing will occur when the temp with the missing
type information is typed.
Change-Id: I950d81fe7fa8272cb37f7eea5b88092d1eb4817e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Tor Arne Vestbø [Tue, 1 Oct 2013 13:35:16 +0000 (15:35 +0200)]
Don't delete scene-graph atlas manager if it hasn't been created yet
QSGContext::invalidate() is called from the QSGContext destructor,
but the atlas manager is only created if QSGContext::initialize()
is called, which may not always happen.
The result was a bunch of "QCoreApplication::postEvent: Unexpected
null receiver" messages during testing.
Change-Id: I11a294d48c06d687a9f82cf1ce825063cda8ecf6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Gunnar Sletta [Tue, 1 Oct 2013 10:08:39 +0000 (12:08 +0200)]
Stabilize tst_qqmlprofilerservice
Change-Id: Ia381d51561f1c183ec7f2e3fcfe49810bfbfcc61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Martin Smith [Tue, 1 Oct 2013 11:03:28 +0000 (13:03 +0200)]
qdoc: no longer recognizes the version nr in QML refs
All QML references of the form
<QML-module-name><QML-module-version>::<QML-type>::<member-name> have
had the <QML-module-version> removed i.
Task-number: QTBUG-33776
Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Chris Adams [Wed, 17 Apr 2013 01:27:17 +0000 (11:27 +1000)]
Add fine-grained QML / QtQuick performance benchmarks
This commit adds a series of benchmarks to test the performance of
fundamental areas of the QML engine (compilation, instantiation, binding
evaluation, positioning) using types provided by the QtQuick QML module.
Change-Id: Iecec058c45aea0bd728f03123fa2aa79d6af8efa
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Laszlo Agocs [Tue, 1 Oct 2013 08:14:54 +0000 (10:14 +0200)]
Fix compilation on Android with 4.8 toolchain
Change-Id: I1ce4ec8c9c671f0130c1530c772c1dd74f1fb1f4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
J-P Nurmi [Tue, 1 Oct 2013 07:55:50 +0000 (09:55 +0200)]
V4: fix ArrayPrototype::method_isArray() build break
With a recent Clang in C++11 mode:
error: incompatible operand types ('QV4::ArrayObject *' and 'bool')
Task-number: QTBUG-33706
Change-Id: I7bd4fe01176745fb6f8dbdf8f271edb7121eb35e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Andrew den Exter [Fri, 27 Sep 2013 04:26:48 +0000 (14:26 +1000)]
Fix PathView stealing mouse grab from its child items.
Apply the improvements that have been applied to Flickables handling of
child items over time to PathView to bring its behavior back in line.
Task-number: QTBUG-33699
Change-Id: I76a412d75c48f9cf2f12f5f6f1aa01ff62d06364
Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Simon Hausmann [Mon, 30 Sep 2013 07:41:35 +0000 (09:41 +0200)]
Fix invalid alias error reporting in new compiler
Match exactly the VME code path by reporting the right type of error
as well as the right hand side of the alias binding if necessary.
Change-Id: I35d192a20641e0acbf25d20f3dc5fb53cc7cbae5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 06:56:29 +0000 (08:56 +0200)]
Improve error location reporting for invalid aliases in old VME
When an alias declaration is missing a location, report the error with the
location of the alias declaration, not the object declaration. This matches
the code patch in the new compiler, which also reports it accurately.
Change-Id: I709dbddb3273f4e05cc4d63079da52d7224466bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 06:46:45 +0000 (08:46 +0200)]
Fix error message for group property definitions on signals in new compiler
It may happen that people forget the colon after the handler name in
onSomeSignal { code here }
and we have to print out the correct error message. It looks like a
group property, but we can identify this binding due to its reserved
use of starting with "on".
Change-Id: I7c502c1a2a5f2a6c613879468a60bc57a7d20fe8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 06:38:55 +0000 (08:38 +0200)]
Improve component boundary detect in new compiler
Instead of going through the property cache and the potential creation
of a dynamic meta object to determine inequality with QQmlComponent::staticMetaObject,
we can simply use the QQmlType and its know metaObject directly to perform
the check. That's faster and more reliably.
Change-Id: If6484b059ec2bed234009755adf2fa3aa19b2b9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 06:37:37 +0000 (08:37 +0200)]
Fix error messages when assigning to non-existent properties in new compiler
Introduce a simple valdator pass early on to catch those assignments. Also
fix storing the correct line/col for default property object bindings and
remember the minor/major version of an import in the final type reference.
Change-Id: Ib2a93dfe1a30fcd9c09b5443fb8199ad11b19769
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 04:36:35 +0000 (06:36 +0200)]
Fix line/column in import related error messages with the new compiler
Grab the line/column from the import token, not the import id token,
as the latter is not always present in all import statements.
Change-Id: Iaa0c2f1d60422fb779fa7a6c4fd1c895fa3f777b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 03:52:31 +0000 (05:52 +0200)]
Fix composite type registration in the new compiler
When setting a property of a composite type like this
property MyType foo: MyType {}
and MyType.qml defines the new type, we test for assignability of MyType to the
property foo. This test happens before MyType is instantiated and it relies on
the meta-type in the CompiledData being set. Therefore this patch makes sure
that the meta-type and the list meta-type are set accordingly at type
compilation time, not instantiation time, similar to how it's done in the VME.
Change-Id: Id7231e0a0113fa63ba6508bfbb1565dd554c5e56
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 03:11:47 +0000 (05:11 +0200)]
Fix JS script imports with namespaces
Make sure to add the resolved namespaces to the import cache, before later
adding scripts into it.
Change-Id: I41537230c49248c2e6c60623bc5a1fe3d50d76cd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 30 Sep 2013 01:28:47 +0000 (03:28 +0200)]
Fix support for JS imports in QML files in the new compiler
Remove the v4 value initialization for imported scripts code out of the VME
(the method didn't even need any members of the VME class) and into ScriptData,
for re-use on the QmlObjectCreator side.
Also add the script index setup for the import cache (used by qml context
wrapper) to the type loader.
Change-Id: Idc3953a48f6fb66d008008e88a2b9b556c775537
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sun, 29 Sep 2013 19:20:09 +0000 (21:20 +0200)]
Compile imported scripts in the loader thread
This has the benefit of blocking the GUI thread less and speeding up type
creation in the GUI thread (for types that import js libraries).
This patch also brings one behavioral change: Due to the parsing at type
instantiation type, things like syntax errors for script imports would only
generate a run-time warning and the code in the QML file would just see
"undefined". Errors in the script now generate real errors at component
compilation time, meaning the errors come out earlier and as real errors.
This patch implements the separation for the VME only (to keep the size
of this patch small).
Change-Id: I82f7f3a2d3d4524ea12a7ab62abd8640aba6a47f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Fri, 27 Sep 2013 16:44:09 +0000 (18:44 +0200)]
V4 IR: do type inference/propagation before optimization.
This gives slightly better results for inplace increment/decrement,
where the operand has to be converted to a number. When that operand is
known to be a number, this conversion can be removed. By doing the
optimizations after typing, these conversions will not only turn into
assignments, but they will be propagated through the IR. That saves
a copy/move, which, in turn, will lighten the work for the register
allocator and the instruction selection.
Change-Id: If76575a71fbcb2d810b94060e61b4364bdaaa065
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Thu, 26 Sep 2013 12:49:44 +0000 (14:49 +0200)]
V4: remove inplace operations
Inplace operations are expanded when building the IR, so the neither the
IR, nor the instruction selection backends or runtime need to handle
them.
Change-Id: Id01f9544e137dd52364cf2ed2c10931c31ddfff3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Thu, 26 Sep 2013 08:25:22 +0000 (10:25 +0200)]
V4: changed environment variable SHOW_CODE.
Use QV4_SHOW_ASM for the generated assembly from the JIT, and use
QV4_SHOW_IR to get dumps of the IR.
Change-Id: Id85d3d6c87b47088c312475a7c737d54c58c7791
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Mon, 30 Sep 2013 05:28:31 +0000 (07:28 +0200)]
Fix license headers of QtQuick sources.
Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gunnar Sletta [Mon, 30 Sep 2013 05:50:33 +0000 (07:50 +0200)]
Remove debug output from tst_qqmlprofilerservice.
I suspect this got snuck in accidentally.
Change-Id: I4684bf333a19e6c760ea499b751d51be34f51c6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Fri, 27 Sep 2013 15:04:42 +0000 (17:04 +0200)]
Remove some uses of raw Object pointers
Change-Id: I7c715f33d197ebbf6f0c00040099b27ed7221d42
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 27 Sep 2013 14:15:38 +0000 (16:15 +0200)]
remove more uses of QV4::Value
Change-Id: I11b0b2b7626297e2c98dc77784574da4b59ba8cf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 27 Sep 2013 07:45:55 +0000 (09:45 +0200)]
Remove most uses of Value from qml/qml
Change-Id: I409a8505a9e01f86d777bc694d24516d1c8f0c4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 27 Sep 2013 06:32:44 +0000 (08:32 +0200)]
Remove some more QV4::Value usages
Change-Id: Ic146a964f2ff6b90eeceda90bf1834d7212386a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 26 Sep 2013 20:07:27 +0000 (22:07 +0200)]
Remove more occurrences of QV4::Value
Change-Id: I66c370680d7e6bee2e73a7a940aa96ab4009ec57
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Fri, 27 Sep 2013 13:31:12 +0000 (15:31 +0200)]
Fix colorization of native rendered text...
Task-number: QTBUG-33633
Change-Id: Ic7fabe36887fc19e28286ae6f4eb2f22b4211b4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Erik Verbruggen [Wed, 25 Sep 2013 10:11:14 +0000 (12:11 +0200)]
V4 regalloc: fix the case where too few regs are available.
When all registers are allocated, and a new range gets active, some
other range will have to be split and spilled to the stack. This gets
slightly more complicated when the temporary is defined by a phi-node,
so in that case, the temporary is immediately spilled.
Change-Id: Iaab8b8e88849866e5841ae752377796e8540e30f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Wed, 25 Sep 2013 09:58:03 +0000 (11:58 +0200)]
V4 JIT: optimize constant-to-register loading.
Change-Id: I02e3cdd5f9a68fbf6bfd7805c385d807b344155b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Tue, 24 Sep 2013 09:42:03 +0000 (11:42 +0200)]
V4 JIT: optimize mem2mem copies.
Instead of loading and decoding a value and then encoding and storing
it, we can just as well fold that into a load+store.
Change-Id: I84c8eb310510a91cefe2cbc0d4bb01856b41663d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Fri, 27 Sep 2013 12:03:36 +0000 (14:03 +0200)]
Stabilize and speed up test
Added lots of missing qWaitForWindowExposed(), and
sped up animations.
Change-Id: Ie3c5e53dc9e9770baa05fb1da3eedce80ac52d31
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Sat, 28 Sep 2013 13:37:43 +0000 (15:37 +0200)]
Fix crash in tst_qmltest with the new animators.
If the target of a job was deleted while it was running we need
to avoid any operations on that job.
Task-number: QTBUG-33723
Change-Id: Ia86856e7f32465f58e25c87f9c74c99b7cb0caea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Friedemann Kleint [Wed, 25 Sep 2013 14:26:42 +0000 (16:26 +0200)]
qmlimportscanner: Fix braces.
Change-Id: I1361bc1f10b04d0001a1d02b45033ca2c82f8105
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Friedemann Kleint [Wed, 25 Sep 2013 14:21:38 +0000 (16:21 +0200)]
qmlimportscanner: Use iostream for output consistently.
host-built tools should not use <QDebug>.
Change-Id: I2c69c79c138689d22f4979e268313fb461a8053a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Friedemann Kleint [Wed, 25 Sep 2013 14:13:27 +0000 (16:13 +0200)]
qmlimportcanner: Compile with QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII.
Clean up single character string constants and string usage.
Change-Id: I242110d57beeb100155757bda170ade479fcb242
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Lars Knoll [Sat, 28 Sep 2013 08:46:33 +0000 (10:46 +0200)]
Mark qmltest as insignificant to get CI to pass again
The animator tests keep crashing randomly.
Change-Id: I0d4b177238fc915931c3503b03e29f433ebf4950
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Sat, 28 Sep 2013 08:37:10 +0000 (10:37 +0200)]
Try to stabilize the multipleTransitions test
Change-Id: Ifeb53d6a1334623106428410aa2756935d7ba6e1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Fri, 27 Sep 2013 20:19:27 +0000 (22:19 +0200)]
Fix compilation of the auto test
Change-Id: I8c10463aa064a25c0170e6b7f294f48501b42319
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Lars Knoll [Thu, 26 Sep 2013 14:45:27 +0000 (16:45 +0200)]
Fix a few more uses of Value
Change-Id: Ib34a348d6091cc5f0a624a3f80569a08c7c78989
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 26 Sep 2013 14:38:22 +0000 (16:38 +0200)]
Remove some uses of Value
Change-Id: I63ac7485b92c96df8520f0d40b148d807e13eccb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 26 Sep 2013 14:17:38 +0000 (16:17 +0200)]
Optimize storeReturnValue for double arguments
Change-Id: Icfe2ad49f6e12322b4d33fefc3c6de21cc3b6141
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 26 Sep 2013 11:05:25 +0000 (13:05 +0200)]
Fix API for Object::define*Property
use ValueRef instead of const Value &.
Change-Id: I3fd0ca829870db27f036825d713c53dc0600be07
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 26 Sep 2013 10:34:53 +0000 (12:34 +0200)]
Less QV4::Value usage
Fix some usages in qv4engine, and fix return types
in methods in qqmlxmlhttprequest.
Change-Id: I3d6225ca01bf7ea77fcc424914c8392bb6c3a454
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 26 Sep 2013 10:08:03 +0000 (12:08 +0200)]
Fix API for evalCall()
Change-Id: Ib80b18348e18eb93044a73358f0c4e266b988f63
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 26 Sep 2013 10:04:52 +0000 (12:04 +0200)]
Remove Value::fromString()
replaced with call to the GC safe ExceutionEngine::newString()
method.
Change-Id: I7258296e75ca724ff42b94a0d147bc33a05f8f68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 25 Sep 2013 20:42:58 +0000 (22:42 +0200)]
Fix Value usage in ErrorObjects
Change-Id: Iaa14ad5a8d3f085843e49195f8f4bb7bb020b9b6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 25 Sep 2013 13:24:50 +0000 (15:24 +0200)]
Remove more direct QV4::Value usage
Remove Value::fromString(String *), and make
Encode safe against encoding raw Managed * pointers.
Change-Id: Ibca4668e1cbeaf85c78169d14386281659d33ef6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 25 Sep 2013 12:03:52 +0000 (14:03 +0200)]
Make Encode not inherit from Value
This allows Encoding of Returned<> pointers, and directly
assigning them to a Value.
Change-Id: I0f22b9921ca5712538f22029fa5449242649e01c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Wed, 25 Sep 2013 11:52:15 +0000 (13:52 +0200)]
Move Value::toInteger(double) and related to Primitive
Also clean up a few other direct uses of Value
Change-Id: Ie27d42c1b31b9e6d16d0a60071cb5e4e1c5b9e8b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>