Simon Hausmann [Thu, 20 Feb 2014 11:21:21 +0000 (12:21 +0100)]
[new compiler] When resolving names of attached properties, don't report the error at import time
Instead report it later with a more specific error message. This is consistent with the old compiler.
Change-Id: Iba345b7ecc8a9ff474938f69118665eb0d965594
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 19 Feb 2014 16:16:35 +0000 (17:16 +0100)]
[new compiler] Fix determination of property caches for attached properties
That in turn fixes error messages around property validation in attached
types.
Change-Id: Idef9f7652b225c5769b7fdf43e41731b197c1144
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 19 Feb 2014 15:03:03 +0000 (16:03 +0100)]
[new compiler] Improve error message for incorrect signal assignments
Change-Id: I16e7cdc6b5b49200259ea7e57d84e00f095554f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 19 Feb 2014 14:55:11 +0000 (15:55 +0100)]
[new compiler] Ensure that qualified type names end in an id with an upper case letter
Change-Id: I35166b86ddc7c2e87dc77b59f4d8272279ca5688
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 19 Feb 2014 14:40:17 +0000 (15:40 +0100)]
[new compiler] Report errors when a property name starts with an upper case letter and lacks a qualification
Change-Id: I66e9669459920cfb3543a3ebcec8501465c2ef85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 19 Feb 2014 12:08:34 +0000 (13:08 +0100)]
[new compiler] Fix error reporting for invalid component specifications
Change-Id: I435845ab1188e65a7ef019d758fbbba57e2e0bec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 19 Feb 2014 11:54:02 +0000 (12:54 +0100)]
[new compiler] Fix error location when id property is used in list model elements
Change-Id: Iec648d593d30117c512009dcc6ab0d50b8fc51af
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 20 Feb 2014 10:38:41 +0000 (11:38 +0100)]
Fix debug output when tests fail
The tests with expected .errors.txt files support setting the DEBUG=1
environment variable to produce string output. Unfortunately "Actual:"
and "Expected:" were swapped in the output.
Change-Id: I2b378b0d9dcc6e513d82837abf9f8b0d5d7e1392
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Gabriel de Dietrich [Fri, 28 Feb 2014 17:39:53 +0000 (18:39 +0100)]
Glyph node: Those null coords are useful after all
Artifacts were visible on Linux after
3f88a5b835198e39
and this seems to be the only behavior change hitting
non-retina displays.
Change-Id: I0d4dc5ca05adb4585c6afad2a24d9c3a8551d809
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Michael Brasser [Thu, 27 Feb 2014 21:59:39 +0000 (15:59 -0600)]
Improve memory usage in QML/V4 engine.
* Don't create prototype Object for bindings and
signal handlers. It is inaccessible and not required.
This saves one Object-sized allocation per binding.
* Shrink the size of QQmlContextWrapper by removing
the v8 member variable.
* Shrink the size of QObjectWrapper by moving the destroy
identifier to the engine.
Change-Id: I76e84e4c0581e97a19d2e959f814ac84d9c431fa
Task-number: QTBUG-37134
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
J-P Nurmi [Fri, 21 Feb 2014 14:04:21 +0000 (15:04 +0100)]
QQuickWindow: fix content item size
Resize content item in QQuickWindow::resizeEvent() instead of using
signals and slots. The signal-slot connections were only established
when child items were added in QML. It should work in C++ too, since
QQuickWindow and QQuickItem are part of the public C++ API and using
them in C++ is a perfectly valid use case.
Resizing the content item in resizeEvent() is not only faster than
using signals and slots, but also in theory a bit more flexible as
one would be able to override the event handler and implement their
own layouting.
Task-number: QTBUG-36938
Change-Id: Id05d4cf6d547021803050633e6f0a3359129a9f3
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Björn Breitmeyer [Tue, 25 Feb 2014 09:18:06 +0000 (10:18 +0100)]
Fixed regression from
fd5c629f4336b1f79
Buffer offsets were wrong, and a type
in the buffer content.
Task-number: QTBUG-36989
Change-Id: I863976420d495b006692c4b614f74c285649cb1a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Paul Olav Tvete [Fri, 28 Feb 2014 10:07:11 +0000 (11:07 +0100)]
QQuickWidget: handle hide and show events properly
Task-number: QTBUG-37062
Change-Id: I3763385168eaa0ccd009ada563f56ea0251029a5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Mitch Curtis [Fri, 28 Feb 2014 08:13:58 +0000 (09:13 +0100)]
Tidy up DropArea documentation.
The delegate property was removed because it doesn't exist.
Change-Id: I010880773629868f3c640c0a4ed34f132454d2f7
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Gunnar Sletta [Wed, 26 Feb 2014 15:36:58 +0000 (16:36 +0100)]
Ensure that ShaderEffectSource's texture has correct parameters.
The provider is created on demand in textureProvider(), but its
parameters are set in updatePaintNode() so if updatePaintNode() was
called before a consumer asked for the texture provider, they wouldn't
be set until the next time updatePaintNode() was called.
Change-Id: Iff866d50a8fe16f3d371cb8e590528f5f8c5ee61
Reviewed-by: Mikko Harju <mikko.harju@jolla.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Gunnar Sletta [Thu, 20 Feb 2014 16:27:03 +0000 (17:27 +0100)]
Threaded render loop should block until the frame is swapped.
Introduced the concept of an expose cycle, as the WM_Expose
is followed by WM_RequestSync and only after we handled the
sync and then swap, should we unlock. Otherwise, we are
potentially waiting for the wrong swap.
This also fixes a bug when we get an expose while the render
thread is animating on its own. We would previously set
RequestRepaint, but this could potentially be reset by a render
thread animation if the GUI thread took a short while getting
to the point where it sent the RequestSync. If that requestsync
did not result in SG changes, we would not render anything.
With the exposeCycle, we are now guaranteed to repaint after
we handled the sync, which is how it should be.
Task-number: QTBUG-35805
Change-Id: Ib5c588f135763142e57f84b39dd3827fd05b9485
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Tor Arne Vestbø [Wed, 26 Feb 2014 14:27:23 +0000 (15:27 +0100)]
Fix renderType: Text.NativeRendering on retina screens
The QSGDefaultGlyphNode's QSGTextMaskMaterial failed to take the device
pixel ratio of the surface into account, both when building the glyph
cache in init() and when blitting the glyphs from the cache in populate().
We now handle both, resulting in equal rendering as the raster engine,
which itself matches CoreText, except for some minor shaping differences.
One snag with the QSGTextMaskMaterial compared to eg. the raster engine
is that the incoming glyph positions (from shaping) are not pre-scaled,
which means we have to be careful to apply the device pixel ratio before
rounding the coordinates, to match the behavior of the raster engine.
Change-Id: I51cf796bd437f68fad298f689ee3f2d9a2863b4d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
J-P Nurmi [Thu, 27 Feb 2014 10:04:04 +0000 (11:04 +0100)]
Fix tst_qquicktext::hover()
Task-number: QTBUG-36938
Change-Id: I28da25235ae7b8805ebc474777a5edd43ceef941
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
J-P Nurmi [Thu, 27 Feb 2014 14:13:33 +0000 (15:13 +0100)]
Canvas: do not emit paint signal when invisible
Task-number: QTBUG-31830
Change-Id: I23c6fc822547120f14c2d9a09f01a8f985745e2a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
J-P Nurmi [Thu, 27 Feb 2014 13:54:09 +0000 (14:54 +0100)]
Revert "Fix item polishing"
This caused items like positioners and itemviews to not
relayout or update as appropriate when items were hidden,
and therefore caused problems all over in eg. controls.
This reverts commits
-
43f983350a548b1b663ea07a0e87e4cc58834214
-
01e609e9fa0ca1317e0f4eff4802a79584450357
-
439f31f128e70ecae16544ee7041695c60e0b2d6
Task-number: QTBUG-36954
Task-number: QTBUG-36934
Task-number: QTBUG-31830
Change-Id: If04cdce51206568c360a45e24efc0bd04764750b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Ulf Hermann [Wed, 26 Feb 2014 17:42:48 +0000 (18:42 +0100)]
Fix behavior when starting/stopping multiple QML profilers at once
Make sure they're all inserted into the m_startTimes map before any of
them is actually stopped. Otherwise multiple "Complete" messages can be
generated for only one profiling session.
For consistency, also allow all profilers to be started at the same
time with only one call to startProfiling().
Task-number: QTCREATORBUG-11532
Change-Id: I8f80e2f7432c31d5911e139f9632c36f2494cb96
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
J-P Nurmi [Thu, 27 Feb 2014 18:06:13 +0000 (19:06 +0100)]
Mark tst_qquickpathview insignificant on OS X
Task-number: QTBUG-27740
Change-Id: I0dbf74b9fb8a4e7542d9d5b3c4f1d0516b04cd36
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fawzi Mohamed [Thu, 13 Feb 2014 15:33:18 +0000 (16:33 +0100)]
qmlplugindump: adding isComposite
Change-Id: Ia742c26402156b09bc91590cef6a10755a8df754
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Nils Jeisecke [Mon, 7 Oct 2013 09:55:12 +0000 (11:55 +0200)]
Make GridView/ListView attached "view" property available to all delegate types
This is useful for accessing the view (e.g. "width", "cellWidth", ... properties)
from within section (ListView only), header, footer and highlight delegate components.
A typical usecase are components that are used in multiple views and therefore
cannot use the views's id for access.
The only attached property valid for those non-item delegates is "view". This
has been added to the documentation.
Change-Id: I33d976da778be23ed531a3b193ceee95ed9800d2
Task-number: QTBUG-32836
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Michael Brasser [Mon, 17 Feb 2014 15:35:20 +0000 (09:35 -0600)]
Fix global object handling in worker script JS files.
Task-number: QTBUG-36874
Task-number: QTBUG-36881
Change-Id: Iacf4807dd37862e792ad1ba4ce540a6d48f1e495
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Mon, 24 Feb 2014 11:45:39 +0000 (12:45 +0100)]
Add double-click to QQuickWidget
Task-number: QTBUG-36935
Change-Id: I498561f6bbd5a9b279034d16ef5ae4fb36607ed3
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Shawn Rutledge [Tue, 25 Feb 2014 11:57:45 +0000 (12:57 +0100)]
tst_qquickpathview: show window before flicking
It's uncertain whether this caused any actual CI failures, but other
tests show the window first, and this one tests interactive
functionality so it makes sense that it should be visible.
Change-Id: I92c26ce596f556765917409ca4e9037bdaccfa23
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Morten Johan Sørvig [Tue, 11 Feb 2014 14:19:33 +0000 (15:19 +0100)]
Add support for scanning javascript files.
Javascript may contain ".import" pragmas/statements,
which should be treated in a similar way as qml file
imports.
Add findQmlImportsInJavascriptFile() which extracts and
parses the .import lines. Refactor findQmlImportsInFile()
to handle both .qml and .js and call out to the correct
parsing function.
Add "-jsFiles" for specifying javascript
files on the command line similar to "-qmlFiles".
Task-number: QTBUG-35349
Change-Id: I6b8e0cc254c1edcf16940bec5cfda7c2637f115e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Laszlo Agocs [Sun, 23 Feb 2014 12:22:13 +0000 (13:22 +0100)]
Fix crashes and incorrect extension queries on GL3+
glGetString(GL_EXTENSIONS) is deprecated in OpenGL 3.0+.
This means that in core profiles on 3.2+ (or without the fwd
compatibility bit on 3.0/3.1), the call is not supported and may
return NULL. This causes a crash in at least one place where we
try to blindly strstr the result. The correct solution is to use
QOpenGLContext::extensions() and hasExtension() which is prepared
to handle GL3+.
Change-Id: I52fec7dcee001cdc0933af03f5eed4b7c822b2bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Gunnar Sletta [Mon, 10 Feb 2014 14:51:16 +0000 (15:51 +0100)]
Introduced a few more signals to QQuickWindow.
Also marked the new afterAnimation() signal as \since 5.3 and
introduced proper revisioning on the new signals.
[Changelog][QtQuick] Added QQuickWindow::afterSynchronizing(),
openglContextCreated(), sceneGraphAboutToStop(). Useful for
deeper integration with the rendering.
Change-Id: I5532b310506c2432325595e55ef9307b8934abee
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Marco Bubke [Wed, 19 Feb 2014 13:54:24 +0000 (14:54 +0100)]
Fix wrong assert in QSGRenderLoop::setInstance
The assert before test not if the scoped pointer is null but the pointer
which was holding the scoping pointer.
Task-number: QTBUG-36932
Change-Id: I7a5e51752446556c1796bb677fe69cbceffdd3e0
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Fawzi Mohamed [Thu, 13 Feb 2014 15:32:17 +0000 (16:32 +0100)]
qmlplugindump: adding writeBooleanBinding to write booleans
Change-Id: I13077ad0d6522d91af0dab7d7bc30346b188ee4b
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Ulf Hermann [Fri, 21 Feb 2014 16:37:40 +0000 (17:37 +0100)]
Register the QML profiler's animation callback from the GUI thread
QUnifiedTimer is thread-local, so that a different object is returned
from instance() for each thread. This patch makes sure we register to
the one that performs the animations.
Task-number: QTCREATORBUG-11536
Change-Id: I23c3ff49f94668517b9894298a4d770a8c30e705
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Ulf Hermann [Fri, 21 Feb 2014 13:15:51 +0000 (14:15 +0100)]
Don't needlessly flush start times when stopping profiling
QQmlProfilerService::messageReceived() can call stopProfiling() multiple
times in a row. If we flush the start times every time we get
inconsistent data in the client. Profiler adapters should be removed
from the start times when they're deleted, though.
Task-number: QTCREATORBUG-11532
Change-Id: I6820971b7a93a7337cd8ad1b7b8b5aafdd654ab5
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Simon Hausmann [Sat, 15 Feb 2014 03:39:33 +0000 (04:39 +0100)]
Determine whether or not an object literal requires a sparse array at compile time
Change-Id: Ieb7f6ee97a4f251f1e2369850ebb9e2931f84ac1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Sat, 15 Feb 2014 01:16:43 +0000 (02:16 +0100)]
Clean up object literal handling with integral indices
* Object literals with array indices are now created with one
run-time call, instead of an initial one for non-integral keys
followed by sub-sequent define_builtin_property calls.
* Cleaned up propert name retrieval. Instead of using a visitor,
it's easier to define a virtual method on the PropertyName type. The visitor
doesn't buy us much as it's not possible to recurse within property names, and
this way we can use it also from the function scanner to correctly determine
the number of arguments needed for object literal initalizations.
* Similarly the duplicated/common name member for all property assignments
has been moved into PropertyName, for convenient access without AST casts.
* Removed now unused builtin_define_property/settergetter functions from IR,
run-time and moth.
Change-Id: I90d54c81ea5f3f500f4f4a9c14f7caf5135e7f9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Frederik Gladhorn [Mon, 24 Feb 2014 18:55:03 +0000 (19:55 +0100)]
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I68fd0e1d837bcd918c8efaf67fa88dee4a90b3be
Lars Knoll [Fri, 14 Feb 2014 11:28:06 +0000 (12:28 +0100)]
Smaller cleanup
Cleanup the code to generate a swapValues instruction
to only require one code path for 32/64 bit. In
addition, this seems to be slightly faster even on
x86-64.
Change-Id: I0584c3eb5249606ca7541abfbce227e5cb44711f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 14 Feb 2014 12:58:40 +0000 (13:58 +0100)]
Clean up our internal namespaces
QQmlJS::MASM -> QV4::JIT
QQmlJS::V4IR -> QV4::IR
Change-Id: I707e8990459114a699c200fe3c22cec3c8df1afc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 11 Feb 2014 08:46:45 +0000 (09:46 +0100)]
Move binops out of the isel
Move the binop handling into qv4binop* to clean up the
code and ease maintenance.
Change-Id: I0053380be7f326a2100302a63e921698a5b28c2a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 10 Feb 2014 15:31:18 +0000 (16:31 +0100)]
Move unops into it's own file
Change-Id: I17aaff4d044608462e1edabc5612685591b3a433
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 10 Feb 2014 14:58:11 +0000 (15:58 +0100)]
Move the Assembler class into it's own file
Change-Id: I9968b3ae5ad5fbad3490e08e173c22e4a643c91f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 10 Feb 2014 14:46:28 +0000 (15:46 +0100)]
Move JIT infrastructure into it's own directory
This is a starting point to clean up some of the
code base for the JIT.
Change-Id: I388ce8df7d4ab87095e227cf36643f4be2594b7d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 10 Feb 2014 13:27:55 +0000 (14:27 +0100)]
Remove unused method
Change-Id: I03d30ef5b06408d4d482e81f86bdc27c71a5d7e8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sun, 9 Feb 2014 20:11:16 +0000 (21:11 +0100)]
Really eliminate a|0 and b&(-1)
The old code wasn't doing what it promised to do
and failed to remove these expressions.
Change-Id: I6718539fd528f293db537e47ff1c9ac4b27ada55
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sun, 9 Feb 2014 19:09:10 +0000 (20:09 +0100)]
Avoid some unneccesary instructions in swapValues
If source and target values are of the same type, there's no need
to write the type to the stack once again.
Change-Id: I3e1600407012f7bd7f2e5ba91b279b0421be9e68
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 7 Feb 2014 21:29:13 +0000 (22:29 +0100)]
Mask rhs of shift operations in the IR for constants
Saves an instruction for shifts with contants
Change-Id: Ia12355d2fe2b9f80631056cda5edd79b45189e99
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 7 Feb 2014 21:03:57 +0000 (22:03 +0100)]
Slightly simplify generated code for conversion to int
Take only one branch for integers, and save one instruction in
total.
Change-Id: I496f11fb3f080f71e9f415ebb4201228c63471b8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 7 Feb 2014 14:13:17 +0000 (15:13 +0100)]
Remove unused text stream
Change-Id: I23a1f5f2c6f782fab315db4725412a9473178b70
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 7 Feb 2014 13:55:47 +0000 (14:55 +0100)]
Remove some code duplication
Change-Id: If336731a49bcb5e1812d50a39cb97e263f23b183
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 7 Feb 2014 13:40:10 +0000 (14:40 +0100)]
Cleanup: Pass the function into the various SSA stages
Pass in the function object instead of the variablesCanEscape
flag. Cleans up the code a bit.
Change-Id: If2d24b30fb223fa03e27f75f40ad42b881b2b3a0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 7 Feb 2014 08:46:02 +0000 (09:46 +0100)]
Simplify some runtime code
Simpler code and delivers the same performance.
Change-Id: Ifd0398f0c123f4c21998f518574cf74cd7cf7e09
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Jan Arve Saether [Thu, 20 Feb 2014 18:46:41 +0000 (19:46 +0100)]
Update QQuickTextInput's baselineOffset when only height changes
Task-number: QTBUG-36529
Change-Id: I2cd577013c4965e76c9350abaebb9b7a6e4e0270
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
J-P Nurmi [Thu, 20 Feb 2014 17:03:10 +0000 (18:03 +0100)]
QQuickTimeLine: add missing time checks
The same check is done in QQuickTimeLine::pause(), move() and moveBy(),
where the time is passed as an argument. QQuickTimeLine::accel() and
accelDistance() calculate the time based on velocity and acceleration
or distance. With tiny values this calculation can result to a negative
time due to integer overflow.
Task-number: QTBUG-35046
Change-Id: I000e73d3f787375946e8f87a5d24153ae919bc8d
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Oswald Buddenhagen [Tue, 18 Feb 2014 13:39:23 +0000 (14:39 +0100)]
the qmlextensionplugins example and a bunch of reference examples need QtQuick
Task-number: QTBUG-36893
Change-Id: If1f937113b651fd2255f8004739f2c601e3826bf
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Oswald Buddenhagen [Tue, 18 Feb 2014 13:38:43 +0000 (14:38 +0100)]
the shell example and a bunch of reference examples need no QtGui
Task-number: QTBUG-36893
Change-Id: I51e402c90bd727cd3066788e0864e887ab8cb9e4
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Laszlo Agocs [Wed, 19 Feb 2014 12:56:41 +0000 (13:56 +0100)]
Add touch and wheel events to QQuickWidget
Change-Id: Idb444cbc62491469230c5a1f624d71cf20bce492
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Laszlo Agocs [Thu, 20 Feb 2014 15:14:45 +0000 (16:14 +0100)]
Add an error signal to QQuickWindow
When nothing is connected to this signal, an error will be printed or,
in case of Windows, a message box will be shown. If there is something
connected, it is up to the application to handle the error.
[ChangeLog] Added a new sceneGraphError() signal to QQuickWindow
which applications can use to detect errors like OpenGL context creation
failures and react in their own custom ways.
Task-number: QTBUG-36138
Change-Id: I33b1e5e0e3f25872af67c5bb5ae937e3470b25f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Laszlo Agocs [Fri, 21 Feb 2014 12:04:57 +0000 (13:04 +0100)]
Fix missing depth and stencil buffer in QQuickWidget
Change-Id: I34f2015d63d3052b401a82bb4ac7340af94dca8c
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Laszlo Agocs [Wed, 19 Feb 2014 12:31:51 +0000 (13:31 +0100)]
Avoid extra platformwindows with QQuickWidget
QQuickWidget is nice but does not work on platforms like eglfs
because it always creates a (hidden) platform window for the
QQuickWindow.
This is now fixed by avoiding calling create() on the window and
using the toplevel window of the QQuickWidget instead.
Change-Id: Ia552f7a16d8b913fb798fde04b9304c6d037a46c
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Björn Breitmeyer [Wed, 19 Feb 2014 10:36:28 +0000 (11:36 +0100)]
Don't use Vertexarrays
If custom Glcode is used and a buffer is not unbound
the drawcall will take the bound buffer over the
vertex array, so its a bad idea to use them, besides
the fact that in core profile buffers should be used.
Change-Id: I4107d85b664a0c67207652ae34c2569572fa6a8b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Gunnar Sletta [Tue, 18 Feb 2014 18:54:32 +0000 (19:54 +0100)]
Make sure we update filtering options on atlas textures.
We had had an optimization which tried to reduce state changes,
but filtering is also changed in QSGTexture::updateBindOptions
which Atlas::bind() didn't know anything about. Solution: don't
try to be so clever.
Task-number: QTBUG-35457
Change-Id: I39ac0106396921e1b652db2b2aa5a9923b35e825
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Gunnar Sletta [Wed, 19 Feb 2014 20:38:17 +0000 (21:38 +0100)]
Prevent dangling pointer in QQuickShaderEffectSource.
Task-number: QTBUG-36931
Change-Id: Idb584a8703a8d93d2cbcd3feb7942476dc165a59
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
J-P Nurmi [Wed, 19 Feb 2014 15:35:15 +0000 (16:35 +0100)]
Fix item polishing
After "Dont call updatePolish if an item is not visible" (439f31f) and
"Fix polishItems bug" (01e609e), desktop style animations for QtQuick
Controls were no longer running. This was because QQuickItem::polish()
no longer polished a _visible_ item when there were other _hidden_
items in the queue to be polished.
This change restores the old logic that QQuickWindow only keeps track
of visible items to be polished, whilst the idea of hidden items not
being polished still remains valid. QQuickItem is made responsible
for polishing itself if necessary when it becomes visible.
Task-number: QTBUG-36934
Change-Id: I4d48d3a3e2c841d337cd52ec4fd27092f84a8626
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Ulf Hermann [Thu, 20 Feb 2014 15:13:10 +0000 (16:13 +0100)]
Update QQmlAbstractProfilerAdapter documentation.
Change-Id: I11cce4e3494eb2eb06fa781a676cccf5eb2127a8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Laszlo Agocs [Wed, 19 Feb 2014 13:10:20 +0000 (14:10 +0100)]
Update QQuickWidget docs and changelog
Change-Id: I853295f31cf9367a8e11157c9ef0764174c614cf
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Laszlo Agocs [Wed, 19 Feb 2014 11:20:20 +0000 (12:20 +0100)]
Add a signal for syncing external animation systems
[ChangeLog] QQuickWindow will now emit the afterAnimating() signal
from the gui thread before each scenegraph sync request.
Change-Id: I4897c82f75066238e781455d4fce4fb6bbe2558e
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
J-P Nurmi [Tue, 18 Feb 2014 14:30:29 +0000 (15:30 +0100)]
Fix ListModel::setProperty() to accept date roles
Task-number: QTBUG-33564
Change-Id: Ifbc1c5014d41b26223c57fafdc616e9b4ddee5b8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Paul Olav Tvete [Tue, 18 Feb 2014 11:15:30 +0000 (12:15 +0100)]
QQuickWidget example
Change-Id: I4211900ef6a04443bde0c95d074a4a29951b43b0
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Volker Krause [Wed, 19 Feb 2014 12:57:12 +0000 (13:57 +0100)]
Optimize QQuickItemParticle::prepareNextFrame().
This moves one hash lookup out of the inner loop, and most importantly
avoids detaching both the particle group hash and the particle data vector
on every iteration of the inner loop.
Change-Id: If9a127b347367ac9dc1e8ee738ff914784adb896
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Michael Brasser [Mon, 10 Feb 2014 16:16:08 +0000 (10:16 -0600)]
Ensure Behavior stops animating when a new value is set while disabled.
Otherwise the Behavior could cause the property value to end up in an
unwanted and inconsistent state. For example, in the following case:
x: myXValue
Behavior on x { NumberAnimation {} }
x could end up *not equal* to myXValue if myXValue was changed while
the Behavior was still animating but currently disabled.
Change-Id: I3826fdc3f48b2722e778638b116546db7e831e87
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Michael Brasser [Thu, 13 Feb 2014 05:31:22 +0000 (23:31 -0600)]
Make SmoothedAnimation and SpringAnimation smoothly transition again.
Fix regression introduced in Qt 5.0 when animation backend was
rewritten.
Task-number: QTBUG-36709
Change-Id: Ib8caa4bc6a38e3bb4c1d1d3961f775fdd2b342c7
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Tor Arne Vestbø [Wed, 12 Feb 2014 16:40:53 +0000 (17:40 +0100)]
Update glyph cache type/format logic to match qtbase changes
https://codereview.qt-project.org/#change,77791 unified the glyph format
between QFontEngine and QFontEngineGlyphCache.
Now that we're up to date with qtbase, we can unpin the dependency.
Change-Id: Ibcafccb741ce94b454ff7c469804f44fef7fe06f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Tue, 18 Feb 2014 17:47:03 +0000 (18:47 +0100)]
Do not add Images with invalid geometry to the scene graph.
Task-number: QTBUG-35656
Task-number: QTBUG-36050
Change-Id: Iea2d5303bdeb9c523e59ebcdc9f97288060be022
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Arthur Mello [Wed, 19 Feb 2014 12:37:15 +0000 (09:37 -0300)]
Guarantee event's default state as not accepted
Before starting the evaluation of the event to check if it should be
accepted or not, set the state of the wheelEvent to not accepted. That
way, if the event is not accepted it will be propagated to others
elements.
Change-Id: I13a71db8e26c888adc03f1bfd3e46480d3b22b6f
Task-number: QTBUG-36774
Reviewed-by: Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Tor Arne Vestbø [Wed, 19 Feb 2014 12:48:55 +0000 (13:48 +0100)]
Pin qtbase to merge from dev while we integrate glyph cache changes
Change-Id: I4ab46977ec0f137e2bb5a41c67dc09ee962a8b82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Michael Brasser [Fri, 14 Feb 2014 22:20:22 +0000 (16:20 -0600)]
Revert "Fix scenegraph backend API for material shaders."
This reverts commit
a8a90519cb35481e96fe8889846bfaa424e13e8a. The
same functionality is now available in a more extensible way via
the program binary support recently added.
Change-Id: I07b1939611a76858e65605ce625da6c4cbca2114
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Simon Hausmann [Tue, 18 Feb 2014 09:02:27 +0000 (10:02 +0100)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Simon Hausmann [Wed, 12 Feb 2014 14:28:36 +0000 (15:28 +0100)]
[new compiler] Report errors at type compile time for invalid group property access
Change-Id: I36a945dd4e4c0e699a2b34af066eae4d4c73a588
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 20:15:41 +0000 (21:15 +0100)]
[new compiler] Fix error reporting null object group property access
The new code path reported line and column, the latter was missing from the old
code path and is easily added.
Change-Id: I730e56f0fe4e99091dfb10e5f601faf1d3b8949c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 18 Feb 2014 08:58:57 +0000 (09:58 +0100)]
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/qml/jsruntime/qv4functionobject.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
Change-Id: Id164f6c3b45501aa466908659ec4e3b957323753
Tor Arne Vestbø [Mon, 17 Feb 2014 15:43:43 +0000 (16:43 +0100)]
Unpin qtbase in preperation for merge to stable
Change-Id: I833937c85269dfaca7f28fd06c3f55729037b800
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Ulf Hermann [Mon, 17 Feb 2014 11:28:57 +0000 (12:28 +0100)]
Properly export QQuickProfiler
We want to access the profiler from quickwidgets as well as from quick
itself. Also, use better syntax for includes in qquickprofiler_p.h
Change-Id: Ifee04bae84521e8f028e7e2d272824449338b88a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Lars Knoll [Wed, 18 Dec 2013 11:24:56 +0000 (12:24 +0100)]
Introducing QQuickWidget
Renders into an FBO, and provides a texture that is
composed by the QPA/widget kernel compositor.
Also introducing QQuickRenderControl, which is private
API for now.
Change-Id: I710c16e1506124a17f91e87344496471803a448b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Simon Hausmann [Mon, 17 Feb 2014 12:58:21 +0000 (13:58 +0100)]
Update pin of qtbase so that the qtquickcontrols revdep builds
Change-Id: I3dbbad674be889ec6ca0c2ec66e2c995c5b0839b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Erik Verbruggen [Fri, 31 Jan 2014 11:51:00 +0000 (12:51 +0100)]
V4 JIT: enable register allocator on Linux/ARM.
Change-Id: Ieab86edebcc265063904e78c8c8d0014ace64199
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Fri, 31 Jan 2014 11:30:13 +0000 (12:30 +0100)]
V4 JIT: move registers for regalloc out of method.
This is a clean-up: by moving the description of the registers available
for allocation out of the run method, the method gets easier to read,
and the lists are easier to extend when adding more platforms.
Change-Id: I840a15cda0e02488b7e038aa23cedd23508ed736
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Fri, 31 Jan 2014 15:10:17 +0000 (16:10 +0100)]
V4 ARM JIT: make CONFIG+=disassembler work on ARM.
Change-Id: I164813c8939849e63103c447a7f64699003d00da
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 20:08:01 +0000 (21:08 +0100)]
[new compiler] Fix reported error location for unknown type assignments
Change-Id: Ib564002f790921d4e233bb56d1a6ff6ef6aa6c2b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 20:06:21 +0000 (21:06 +0100)]
[new compiler] Compile time check for objects assigned to script strings
Change-Id: I873bded73a0d2210910c496312fb3b7b04e4a65f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 20:00:49 +0000 (21:00 +0100)]
[new compiler] Fix location of id property in error messages
Change-Id: If7cde17acb1dd63a51e2e31415533a21302d8b41
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 19:55:20 +0000 (20:55 +0100)]
[new compiler] Implement compile time error handling for lists
Change-Id: Ic26e8a01995c296ab9cd4deb8714a5cf17cfdf2b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 19:19:20 +0000 (20:19 +0100)]
[new compiler] Match class and file name
QmlObjectCreator -> QQmlObjectCreator
Change-Id: I23da2d9c7fa0dcd760f5cc695c1759b44d1e72f0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 19:12:18 +0000 (20:12 +0100)]
[new compiler] Cleanup object creator members
Collect variables shared across recursive instances in a SharedData
structure, get rid of some other members.
Change-Id: I8d52fbb34820ce17d754b91c3fdee9e534a95753
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Mon, 10 Feb 2014 08:06:07 +0000 (09:06 +0100)]
[new compiler] Fix test with aggressive gc
We need a scope object protector right after creating the JS wrapper,
which is right after creating the VME meta object.
Change-Id: I76668027486a44bab35a3193b4c1c6fbab5c3e0e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 14 Feb 2014 15:35:12 +0000 (16:35 +0100)]
Reduce memory usage for object literals with integral keys
Be more aggressive about using sparse arrays for object literals than for
regular array handling, to reduce the memory usage in this use case. The
current heuristic is that indices over 0x1000 switch to sparse, which means a
simple { "3000" : "test" } creates a long vector instead of a sparse array.
Task-number: QTBUG-36803
Change-Id: Id05c76f0f597cd016114cd27ec54effbebe26e48
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 14 Feb 2014 13:18:01 +0000 (14:18 +0100)]
Fix spurious binding loop errors in QtQuick Controls and other places
Commit
5dc7649f5ad7dca6e13707e827d001c3f118a6ef caused this regression,
as a result of lazy binding evaluation and self-referencing objects:
import QtQml 2.0
QtObject {
property QtObject objectRef : subObject
property QtObject blah: QtObject {
id: subObject
property int value: 42
property int blah: objectRef.value
}
}
When blah is evaluated, we now lazily initialize objectRef - as opposed to
previously throwing an exception and then when objectRef gets initialized we
re-evaluate blah due to its dependency. So while evaluating "objectRef.value"
for blah, we initialize objectRef by evaluating "subObject", and after doing
that we write the "objectRef" property. That triggers a change notification,
and since the objectRef reference for blah is a compile-time known dependency,
the change notification triggers a re-evaluation of "blah", which is the
binding loop.
What's wrong here is that we register the pre-defined captures before the
code execution, when we should register them after the evaluation, or strictly
speaking after flushing pending bindings, like it is the case for individual
properties in bindings where we could not pre-determine the depenencies.
Change-Id: I9fb0c7583cba9d9b71c9ada2791fe87574f6ef44
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 13 Feb 2014 18:46:01 +0000 (19:46 +0100)]
Prospective iOS build fix for tst_qqmlmoduleplugin
Include unistd.h for _PC_CASE_SENSITIVE
Change-Id: I0c57d7d84fa4c7379502dbf95fd22476724d5fa3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Simon Hausmann [Thu, 13 Feb 2014 18:43:55 +0000 (19:43 +0100)]
iOS build fix for qmlplugindump
Do the docker startup thing only for Mac OS X, i.e. using the macx
scope in the .pro file, not mac.
Change-Id: I06266ace2ae0f8a3685b26983a7b2cd5815e3e99
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Simon Hausmann [Thu, 13 Feb 2014 16:36:37 +0000 (17:36 +0100)]
Prospective build fix in the CI system for iOS
Tools contains the import scanner, which is needed by examples.
Change-Id: Ib32338b4b32bf6dd7f1f4a7a2cd5af14ef7eec7a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>