Simon Hausmann [Tue, 7 Jan 2014 14:35:20 +0000 (15:35 +0100)]
[new compiler] Add support for implicitly defined components
Use-cases like
itemDelegate: Item { ... }
implicitly define a component without the item-surrounding Component {}, base
on the fact that the property itself is of type QQmlComponent (or derived).
This means we have to synthesize a Component {} object and insert it into
the data structure.
Change-Id: I8992451a5a6732c7fd898eaf83c276dc6a8b7d19
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 7 Jan 2014 14:59:24 +0000 (15:59 +0100)]
[new compiler] Cleanups
Tie QQmlCompilePass and QQmlTypeCompiler together, so that we can eliminate
the battery of parameters to the individual compiler phases.
Change-Id: If2b6cf8416e6c2253c8f054048d1fd5ae12282b6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Shawn Rutledge [Thu, 9 Jan 2014 16:00:51 +0000 (17:00 +0100)]
QQmlSettings: if debugging is turned on, show the path where stored
Being able to read the file as stored is useful for debugging.
Change-Id: Ifae8d2e1acc654d24efdbff2d2cb433f0e7d3f13
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Simon Hausmann [Thu, 12 Dec 2013 15:23:14 +0000 (16:23 +0100)]
[new compiler] Move component determination and alias resolving
Move the code before the JS code generation, as we are going to need the
component boundaries for the correct scoping. This requires the component and
alias resolver to operate on the pre-compiled-data data structures.
Change-Id: I8d2e697d8a05e5a4914db93e785704f6b2434a2e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Sérgio Martins [Wed, 8 Jan 2014 15:20:05 +0000 (15:20 +0000)]
Classify as Q_PRIMITIVE_TYPE a few private types.
Found by clang plugin matching the criteria:
- is pod / movable
- sizeof(T) <= sizeof(void*)
- used by QList
The only case that can't be fixed is:
QList<TypeCache::Iterator> in qqmltypeloader.cpp:1924
because Iterator is declared in qhash.h:349
Maybe use a QVector ...
Change-Id: I9007cf43b0cf29ff39f3d2c95fb60d766c976ce7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Sérgio Martins [Tue, 7 Jan 2014 19:38:50 +0000 (19:38 +0000)]
Classify struct Use with Q_MOVABLE_TYPE.
It's movable, private, !isLarge and used by QLists in this code.
Change-Id: I08c6e7e65625aba1bc798a3911a20d6d2ddc73fb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 7 Jan 2014 15:10:00 +0000 (16:10 +0100)]
Cleanup: change signature of Object::insertMember()
Methods returning a Property pointer have to be removed, so that
we can move over to store member data requiring only one value for
the common case of data properties.
This will in the long term reduce memory consumption on 64 bit
systems quite a bit.
Change-Id: I78de3794ec7b3bc5db13aa57275d3f08fa9d470a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Tue, 7 Jan 2014 14:36:28 +0000 (15:36 +0100)]
Smaller code cleanup
Move the check for isEmpty() into ArrayData::getProperty.
Change-Id: I1791ced706afadbb2f45883cb1b3915f40500b71
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Mon, 16 Dec 2013 08:16:57 +0000 (09:16 +0100)]
Rework array handling for JS objects
Split up ArrayData into two classes, one for regular
arrays, one for sparse arrays and cleanly separate
the two cases. Only create array data on demand.
Change-Id: I9ca8d0b53592174f213ba0f20caf93e77dba690a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 3 Jan 2014 10:58:03 +0000 (11:58 +0100)]
Fixes for argument objects
Fix a possible infinite recursion, and a corner
case where we wouldn't set the correct data when
writing to the argument object
Change-Id: Ia64b9f62e9b881e24d74e23d96d5eb27805a126f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Sat, 4 Jan 2014 21:32:13 +0000 (22:32 +0100)]
Add Object::hasOwnProperty()
This allows us to remove more getOwnProperty calls. This will
be required later on to extend our array handling.
Change-Id: I7b7f5887990cd443accf51891644fdfbb849cf35
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Wed, 8 Jan 2014 18:26:48 +0000 (19:26 +0100)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Simon Hausmann [Wed, 8 Jan 2014 17:18:04 +0000 (18:18 +0100)]
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ied8d65aaf57e897a3dbc4df100744a594e8ee2cf
Fabian Bumberger [Thu, 12 Dec 2013 13:12:25 +0000 (14:12 +0100)]
Dont call updatePolish if an item is not visible
[ChangeLog][QtQuick][QQuickItem] "updatePolish" is not called for invisible items any more.
Task-number: QTBUG-31830
Change-Id: Idad6107afaf0c6e6c96d9404ac286695c21883c7
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Erik Verbruggen [Thu, 19 Dec 2013 09:37:34 +0000 (10:37 +0100)]
V4: optimize dominator frontier storage.
Changes the dominator frontier storage from a set of basic-blocks for
every basic-block to a BasicBlockSet for every basic-block. This new
class stores a maximum of 8 nodes in a vector, and switches to a bit
vector when going beyond 8 nodes.
This is important in two cases: most basic-blocks have 2-3 nodes in the
frontier, and an array is faster than a set in these cases. The few
cases where the frontier goes beyond 8 nodes, is when a switch
statement is used with lots of cases that all fall-through.
On regress-74474-003.js this reduces peak memory usage from 1.68G
to 60M. The switch statement in this test results in 27000 basic-blocks.
Change-Id: I42646522ba9f8642d42a5d70fc6b760bb47ae69f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gabriel de Dietrich [Wed, 8 Jan 2014 14:22:46 +0000 (15:22 +0100)]
Keys Attached Property: Fix doc reference to nonexistent properties
Change-Id: I5e6a0855b3ad10e3adf6cf73b08a7794daf187da
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Simon Hausmann [Thu, 12 Dec 2013 14:20:09 +0000 (15:20 +0100)]
[new compiler] Cleanups
Move the code that calls the main compilation passes into a separate
QQmlTypeCompiler class, away from the QQmlTypeLoader.
Change-Id: Ia2f33a074d7fe7d9a092ff94d1e6cfc961ad5bdb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 11 Dec 2013 12:44:56 +0000 (13:44 +0100)]
[new compiler] Fix signal handlers for properties declared in the same object
We need to generate the property caches before we can try converting the
signal handler expressions in the AST to function declarations, as that
conversion requires looking up the signal signature / meta-data from the
property cache. This in turn requires rewriting the property cache
generator code to operate on the data structure we have before creating
the QV4::CompiledData.
Change-Id: I0d1c59d947f36171b4eb89f47a2e1ff1bc493c6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Wed, 11 Dec 2013 12:41:05 +0000 (13:41 +0100)]
[new compiler] Fix assigning signal handlers
When assigning a signal handler to the fooChanged property, we need to
look up fooChanged as signal function, not as data property.
Change-Id: I4c0e4374cea8ce9596428975e45e78a0b743a6fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Tue, 1 Oct 2013 07:04:50 +0000 (09:04 +0200)]
[new compiler] Initial support for custom parsers
Enough to support the Connections {} element. What's missing are pre-compiled
bindings signal handlers.
Change-Id: I3ad1413fa636434d899ae8fb380249aaf40363dc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 4 Oct 2013 00:37:53 +0000 (02:37 +0200)]
[new compiler] Preliminary support for QQmlIncubator
Just enough to run some unit tests that use QQuickLoader, components are
created instantly.
Change-Id: I1c827aa946d3e2a60ccc220bb79572aca2ed8c96
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Alan Alpert [Tue, 7 Jan 2014 18:09:28 +0000 (10:09 -0800)]
Ameliorate Documentation
Task-number: QTBUG-33438
Change-Id: I9187513d3b4c68d99c90726288653aae5c553a67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Simon Hausmann [Tue, 7 Jan 2014 08:59:10 +0000 (09:59 +0100)]
[ChangeLog][QtQml] Fix JavaScript Array.pop() not updating the internal array length correctly
While the length property was reporting the correct value, the internal array
length was out-of-sync.
Task-number: QTBUG-35979
Change-Id: I68820a349cf1ce88c6aabc6a2301a8a861018a10
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Larsson [Wed, 11 Dec 2013 06:22:49 +0000 (07:22 +0100)]
Add QQuickMatrix4x4, a way to specify a matrix transform in QML.
Add QQuickMatrix4x4 which makes it possible to specify a 4x4
matrix tranformation directly in QML instead of decomposing the
transformation into rotation, scale etc. It does NOT replace anything,
just adds a new way of specifying a tranformation of an Item.
Change-Id: I1b123778d1d458dfe4314cdb4f0fc99fd8a4c86a
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Gunnar Sletta [Tue, 7 Jan 2014 10:10:59 +0000 (11:10 +0100)]
Use qDebug for all debug under src/quick/scenegraph.
Mixing printf and qDebug can make the output come out of sync.
Change-Id: Ia71e71b09cb3bf651010eb2eb652db7899b07f0d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Caroline Chao [Mon, 6 Jan 2014 14:19:37 +0000 (15:19 +0100)]
Doc: Add links to Qt Quick Test Reference Documentation
To TestCase and SignalSpy documentation.
Change-Id: I83f18ab107e8d047756568ab2cdddd1eaf5574ec
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Shawn Rutledge [Mon, 16 Dec 2013 15:05:25 +0000 (16:05 +0100)]
remove QtQuick.Dialogs and related modules
They are being moved to the QtQuick Controls repository (see change
ba9ba084124403bd8930e29d8afcea9d64b6c0b6 in qtquickcontrols).
This makes it possible to use QtQuick Controls in the implementation.
[ChangeLog][QtQuick][Dialogs]Moved dialog implementations from
qtdeclarative module to qtquickcontrols module due to dependencies
Change-Id: I76d5b71b185dd14a188ea68f18bfec61b4bf2f41
Reviewed-by: Liang Qi <liang.qi@digia.com>
Simon Hausmann [Mon, 9 Dec 2013 16:15:26 +0000 (17:15 +0100)]
[new compiler] Fix determination of id objects within component boundaries
Don't draw the boundaries at Component {} level but at the level of the
element inside the Component, so that we can still get the id of the Component
element itself within the surrounding scope.
Also removed unused data structure.
Change-Id: I29e086e92f0310a38ba0a71224329f7399b397b2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 4 Oct 2013 01:02:49 +0000 (03:02 +0200)]
[new compiler] Add support for parser status callbacks
Change-Id: I62ce1fab2537d533d1d2052a7f5edc5061adf75e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Fri, 6 Dec 2013 10:29:43 +0000 (11:29 +0100)]
Clean up handling of illegal names and enable in new compiler
Access to the identifier hash may not be thread-safe from the loader thread, so
use a QSet copy instead (which is cheap because we don't detach).
This also enables the checking for illegal types again.
Change-Id: I8c3ec1fd0fc01cce3269e206f479a90bdbbc89dd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Frederik Gladhorn [Mon, 6 Jan 2014 15:12:40 +0000 (16:12 +0100)]
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: If9a205bea219b9aca95d78b1e556ca9bbff58dd0
Frederik Gladhorn [Fri, 3 Jan 2014 09:14:12 +0000 (10:14 +0100)]
Accessibility: mark more items as focusable
Change-Id: I8b5189bdf46305ad11f2dd1e689423152e542dcf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Frederik Gladhorn [Fri, 3 Jan 2014 08:38:35 +0000 (09:38 +0100)]
Accessibility: quick items are not visible when their window is not
Change-Id: I126b0ca7414b03f17834ca8e90dd84c9d1c44add
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Simon Hausmann [Fri, 3 Jan 2014 09:38:33 +0000 (10:38 +0100)]
Fix interaction of QQuickItems with the garbage collector
The QObject ownership of QQuickItem objects is not accessible / mutable
in QML, because the parent property maps to the (dynamic) visual parent.
There are use-cases of creating QQuickItem objects without a QObject parent and
to support this, the visual parent needs to mark its visual children in order
to provide intuitive semantics.
[ChangeLog][QtQuick][Import Behavior Changes] A QQuick Item is now strongly
referenced by its visual parent item, so it doesn't require a QObject parent to
stay alive.
Task-number: QTBUG-35913
Change-Id: Ief2d40ac76298a0cf241ca73ff654c4ecfa12748
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Thiago Macieira [Fri, 3 Jan 2014 22:47:10 +0000 (20:47 -0200)]
Remove unused static functions from QtQml found by Clang 3.4
qqmlcomponent.cpp:112:23: error: unused function 'buildTypeNameForDebug' [-Werror,-Wunused-function]
Change-Id: I5cc82b20fee8e3f0b61ad59b831723359c8dcda4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Thiago Macieira [Fri, 3 Jan 2014 23:08:15 +0000 (21:08 -0200)]
Also fix the unused variable warning that ICC found with Clang
The ICC fix happened on
e02cb2b31ab0b171f11d278305d9f532f005bc80. This
now fixes for Clang 3.4:
cached-powers.cc:134:18: warning: unused variable 'kCachedPowersLength' [-Wunused-const-variable]
Change-Id: I876d9d5cf43fb7eb76117d6fdc37265295c360df
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 13 Dec 2013 13:25:39 +0000 (14:25 +0100)]
Fix a warning about casting from ascii
Change-Id: I4e1b7151742dcb6296e59dd59146c908cd5587ba
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 13 Dec 2013 12:31:32 +0000 (13:31 +0100)]
Move array data into it's own struct
First step of separating the array data from Object.
Change-Id: I5c857397f0ef53cff0807debdb1e405424e1046a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 13 Dec 2013 11:15:25 +0000 (12:15 +0100)]
Get rid of the nonStrictArgumentsObject flag in Managed
Change-Id: I4ac58e9d87506ae930c2e44e6089f4af3cd9ccb2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 13 Dec 2013 09:01:33 +0000 (10:01 +0100)]
Use the flags to check whether a Managed is of a certain type
Change-Id: I740c4b7e26bdb9d9f40c1c46615cc68f679e036f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 13 Dec 2013 08:42:24 +0000 (09:42 +0100)]
Fix compiler warning about wrong reinterpret_cast
No need to use reinterpret_cast's in the type checking
for the Managed casting. A static cast works just as well
(as it's actually used two lines further down).
Change-Id: Ie531098eddddda7e9f151eaedc136cbeab14f473
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Fri, 6 Dec 2013 09:28:50 +0000 (10:28 +0100)]
Move Managed::type and some flags into the vtable
Move the type flag into the vtable to free up these
bits in the Managed class, and not have to set them
at object construction time.
As we often need to know whether a Managed object is a
Object, FunctionObject or String, add some bitflags to test
for these to the vtable.
Change-Id: I7d08ca044544debb307b55f124f34cb086ad9e84
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 5 Dec 2013 13:44:46 +0000 (14:44 +0100)]
Clear out memory in the GC, not when constructing objects
Object construction shouldn't need to zero initialize itself,
let's rather do this in the GC, where we can use fast memset's.
Change-Id: I2f9efa1729183b0d737de5a84f92af319b2c5631
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Lars Knoll [Thu, 5 Dec 2013 13:02:50 +0000 (14:02 +0100)]
Do not call InternalClass::changeVTable directly
vtable changes need to happen when the internal class
is being constructed, not later on.
Change-Id: Ibb9515745c9fc3507a5a90b4cc50a33e2e0d3f99
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Shawn Rutledge [Mon, 30 Dec 2013 15:55:41 +0000 (16:55 +0100)]
QtQuick.Dialogs FileDialog: default mode is ExistingFile
Previously did not sync the mode with the state of the selectExisting
property on construction.
Task-number: QTBUG-35877
Change-Id: Ifb630fb51c463025ec2f6a1932714f354552c234
Reviewed-by: Liang Qi <liang.qi@digia.com>
Simon Hausmann [Thu, 2 Jan 2014 11:17:31 +0000 (12:17 +0100)]
Fix property access to QQmlPropertyMap objects when addressed via id
Property access to id objects is optimized at compile time, but we cannot do
that for QQmlPropertyMap instances (or generally fully dynamic types).
This issue was a regression against Qt 5.1
Task-number: QTBUG-35906
Change-Id: I759a1a899f6a3a1f6466282f455b289ad7451086
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Simon Hausmann [Thu, 2 Jan 2014 07:48:55 +0000 (08:48 +0100)]
Fix lookups of enums in singletons
This is a regression against 5.2.0 (which didn't have this bug), due to
optimizations introduced in the stable branch after the release. The code path
for optimizing access to the members of C++ based singletons through the
regular meta-object properties would end up excluding access to enums when the
lookup happens at run-time. The run-time getter for the singleton itself would
return a wrapped QObject instead of a QQmlTypeWrapper, and only the latter
includes enums.
As QML based singletons (composite singletons) cannot declare enums, we can
continue to do fast lookups on these, but otherwise have to fall back to the
slower code path.
Task-number: QTBUG-35721
Change-Id: Icc66bdaf3572622cdb718f82b706e3204afa0167
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Wed, 18 Dec 2013 10:34:17 +0000 (11:34 +0100)]
V4: remove class field in DominatorTree that was used only once.
Calculation of all the children of nodes in the dominator tree is now
calculated as a local variable right before computing the dominator
frontier. The effect is that they are not retained after their only use.
Change-Id: I83c962c691b78cb767708eb04cf30d3b7a760deb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Tue, 17 Dec 2013 11:44:07 +0000 (12:44 +0100)]
V4 IR: do not add unconditional jumps to work lists
Both type inference and the optimization pass do not do anything with
unconditional jumps. So, instead of adding them to the worklist and
later on removing them again, it’s faster to never add them in the first
place.
Change-Id: Ib81d43e9ea6df2b1a70e9dd1e9b9c29cb6d345d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Tue, 17 Dec 2013 11:30:11 +0000 (12:30 +0100)]
V4: re-enable test cases disabled for QTBUG-34047
Task-number: QTBUG-34047
Change-Id: Idcce254f3594e1f7021705704dbe6a2330aa7e65
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Erik Verbruggen [Mon, 16 Dec 2013 15:45:59 +0000 (16:45 +0100)]
V4 IR: change datastructures for dominator calculations.
Replace hashes from basic-block to basic-block with vectors that
associate basic-block index to basic-block index.
Change-Id: I834ea3d825e4d2b02c075b1b0f080f5a65f41317
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Sze Howe Koh [Mon, 30 Dec 2013 04:15:09 +0000 (12:15 +0800)]
Doc: Fix broken links
Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Shawn Rutledge [Thu, 12 Dec 2013 07:54:22 +0000 (08:54 +0100)]
QtQuick ColorDialog: ensure slider rotation takes effect
Task-number: QTBUG-35206
Change-Id: Ia6b4f743cd9bea937eb891ddd16776f975d42bcd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Shawn Rutledge [Fri, 27 Dec 2013 16:16:47 +0000 (17:16 +0100)]
QtQuick.Dialogs: check for inheriting from QApplication
Widget-based dialogs are allowed if the application is a
QApplication, but subclassing is OK too.
Task-number: QTBUG-35769
Change-Id: Iec329792d7c1d85adcb1c3542444f0e92792b20b
Reviewed-by: Liang Qi <liang.qi@digia.com>
Mitch Curtis [Tue, 17 Dec 2013 09:05:42 +0000 (10:05 +0100)]
Context2D: don't use an arrow to illustrate scaling in the docs.
The example image scales an arrow, but uses an arrow to indicate that
the next image (an arrow) is a result of the first arrow being scaled.
Instead, use a circle.
Change-Id: I8de18d4c2f3cb309681f63c31b0c9f7255d1868c
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Simon Hausmann [Tue, 24 Dec 2013 09:33:07 +0000 (10:33 +0100)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Simon Hausmann [Fri, 6 Dec 2013 09:51:42 +0000 (10:51 +0100)]
Change C++ parameter type used for var parameters in QML declared signals
"signal someSignal(var foo)" mapped to foo being of type QVariant.
Unfortunately that is a "lossy" type and it cannot represent all JavaScript
values, including for example function closures (as reported in the JIRA bug).
Instead we should use QJSValue. It is an important behavioural change because
it affects the presumably rare case of somebody declaring a signal in QML with
such a parameter and connect to it from C++ (or trying to emit it) - in that
situation the code needs to be changed.
Task-number: QTBUG-35171
Change-Id: I4fb4a18b407e4ea6c28a3a297fc6f76edb76d734
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Frederik Gladhorn [Tue, 24 Dec 2013 09:30:20 +0000 (10:30 +0100)]
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/quick/items/qquickrectangle.cpp
Change-Id: Ia40bc0f2f08b5be68e32eb1e1f118445d20e44fc
Shawn Rutledge [Thu, 12 Dec 2013 09:21:29 +0000 (10:21 +0100)]
systemdialogs example: path to /tmp is different on Windows
Task-number: QTBUG-34100
Change-Id: Ic06ed2933b76704b1a298de826cbe6b8587fee76
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Venu [Thu, 19 Dec 2013 12:25:07 +0000 (13:25 +0100)]
Doc: Fixed a few broken links and snippets
Couple of \snippet references in the ListModel docs
were pointing to files outside the exampledirs boundary.
Update those references to use the relative path.
Change-Id: Ibf9d0fda9e5280345b08cb66a4fe0db9142a42a6
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
J-P Nurmi [Wed, 18 Dec 2013 16:45:52 +0000 (17:45 +0100)]
QtQuick docs: add missing \qmlpropertygroup commands
"warning: No QML property group command found; using..."
Change-Id: Iafbdbc09cbd76bf81a5baf3a5a4fab843778b5cb
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Venu [Mon, 16 Dec 2013 15:02:09 +0000 (16:02 +0100)]
Doc: Updated the image URL
The existing HTTP url for logo.png was automatically
redirected to an HTTPS url which fails without SSL. So
updated the example to use different HTTP url.
Also updated another image URL, which is invalid now.
Task-number: QTBUG-35557
Change-Id: I793fc5ebda64b21f443da7db9ecda76ae951d5bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Oswald Buddenhagen [Thu, 31 Oct 2013 12:38:33 +0000 (13:38 +0100)]
use private linkage where possible
Change-Id: I1f51b7d043f49f2f2849eb370ac71366cbaa6da5
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Oswald Buddenhagen [Thu, 31 Oct 2013 12:38:23 +0000 (13:38 +0100)]
remove obsolete workarounds for qmake processing order problems
Change-Id: I4b58eee6243c92f67bdd9c8f9da36ef82a489c12
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Erik Verbruggen [Mon, 16 Dec 2013 13:38:45 +0000 (14:38 +0100)]
V4 SSA: add some more literature references.
Also fixed some comments.
Change-Id: I4aedff84bdbf8de248025bc48805a859704bdd8a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Andrew den Exter [Fri, 13 Dec 2013 06:10:58 +0000 (16:10 +1000)]
Fix deadlock when QQmlEngine is destroyed during compilation.
Before blocking to wait for the thread to finish ensure the thread
itself is not waiting for the main thread to complete some action
otherwise both threads will be waiting on the same wait condition that
neither is able to wake. Likewise ensure the shutdown action is
processed if the last scheduled event is currently being processed.
Task-number: QTBUG-35581
Change-Id: I483fc56d0d398493f9fa907f3ab203439bfb9221
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Andrew den Exter [Mon, 23 Sep 2013 06:30:40 +0000 (16:30 +1000)]
Fix positioning of item when first cacheBuffer item is removed.
When items prior to the first visible item are removed from the instantiated
items list the first item is moved forward by the size of the item removed so
it position remains correct relative to the visible items. But if the removed
item is the first instanitated item then it's size shouldn't contribute to the
offset as the next instatiated item is already offset by its size.
Task-number: QTBUG-33619
Change-Id: I05c33f505e2856afa08cd9cd89d8eae97c20679d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Shawn Rutledge [Mon, 16 Dec 2013 09:58:05 +0000 (10:58 +0100)]
QtQuick window example improvements: window size and DPI info
On high-resolution displays it's important to size the window so that
the content will fit. Also show the DPI conversion for pixel density.
Change-Id: Ie35852ecff0bb0ee5ab9b77c6c18e82cfc300448
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
J-P Nurmi [Tue, 17 Dec 2013 22:09:29 +0000 (23:09 +0100)]
Docs: fix Drag::onDragStarted() and onDragFinished() signals
Change-Id: Iefda2d3611ed0f940255f1375ca4c356827fbc70
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
J-P Nurmi [Tue, 17 Dec 2013 21:53:42 +0000 (22:53 +0100)]
Fix & cleanup whitespace in qquickdrag.cpp docs
Change-Id: I85b986c8b3dca6ccc872807a1d2e8b7b71688c0e
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
aavit [Tue, 17 Dec 2013 15:11:19 +0000 (16:11 +0100)]
Fixes: qml memory corruption on Android
Bionic pthreads reports too small stack size for main thread.
Change-Id: I3d33229e76101a847309c723d534844ffb2d2042
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Oswald Buddenhagen [Mon, 16 Dec 2013 14:28:53 +0000 (15:28 +0100)]
ensure that qmltest users have CONFIG+=console
Task-number: QTBUG-35603
Change-Id: Ia337845004290d0e01c391130bbf55ec31e52c9e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Thiago Macieira [Fri, 29 Nov 2013 05:32:55 +0000 (21:32 -0800)]
Delete a disallowed template instantiation the proper way
C++11 allows you to do = delete to the declaration. But some version
of Clang on Mac doesn't like it. I'm guessing it's a compiler bug in
an older version of Clang used in the Qt CI system. I can't reproduce
the issue, so no further investigation was done.
So just remove the "inline" keyword, which is what ICC 14.0 complains
about:
MathExtras.h(270): error #864: extern inline function "clampTo(double, T, T) [with T=long long]" was referenced but not defined
Change-Id: I3887ccb527b5995ffa7ece612f9c7d5a80e71079
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Shawn Rutledge [Thu, 12 Dec 2013 11:26:13 +0000 (12:26 +0100)]
QtQuick Dialogs: don't use native windows on iOS
It makes more sense to show the dialogs as items in the scene
rather than as undecorated windows.
Task-number: QTBUG-35561
Change-Id: I2fb29ed8eeb999b99829a9d5ffc088f401d5d602
Reviewed-by: Liang Qi <liang.qi@digia.com>
Frederik Gladhorn [Mon, 16 Dec 2013 16:05:21 +0000 (17:05 +0100)]
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/quick/items/qquickitem.cpp
src/quick/items/qquicktext.cpp
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
Change-Id: I0bc5786098193c2c40b6fd8905de75d90f6ed0cf
Venu [Tue, 10 Dec 2013 12:44:36 +0000 (13:44 +0100)]
Doc: Made copy of the QML files in the snippets directory
The Delegate.qml and view.qml files were not in the
scope of Qt QML exampledirs. These files were in the example
directory under quick, so had to make of copy of them in the
snippets directory and update the snippet path to get the snippets
in the html output.
Task-number: QTBUG-35445
Change-Id: Ic3fa19dbd36b91d76fbc497ab524f5c0ff91325f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Robin Burchell [Wed, 13 Nov 2013 11:41:19 +0000 (12:41 +0100)]
Fix touch to mouse synthesis/propagation.
Having mouse events synthesised from both QtGui and internally in QtQuick is
not a great way togo about things, especially when QtGui doesn't have the same
degree of knowledge as QtQuick about the items in the scene.
Thus, we now accept all events inside QtQuick to block QtGui synthesis, which
should fix a significant amount of edge-case touch breakage/bad behavior.
Change-Id: I14e1c87761c8f43160049b5e6f9da15b4e5edbb7
Done-with: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Michael Brasser [Wed, 11 Dec 2013 18:28:53 +0000 (12:28 -0600)]
Fix SpringAnimation in Behavior when current value is set.
Fixes regression introduced by
d489f2f6549a86b3949004d1c8ec68487fc2adb7.
We now only avoid running the animation if the Behavior wasn't already
mid-animation. This ensure correct behavior for SpringAnimation, and
also correct state for 'running'.
Task-number: QTBUG-21549
Change-Id: I0f97813294cca22fb7a273e222fa0549c6de9ca7
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Erik Verbruggen [Tue, 3 Dec 2013 14:59:11 +0000 (15:59 +0100)]
V4 IR: change block scheduling algorithm from recursive to iterative.
This makes time- and memory-complexity a lot better when compiling
big JavaScript functions.
Change-Id: I2a7cb9b5979844254747fa5cf7355cca0b113904
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Frederik Gladhorn [Thu, 12 Dec 2013 17:06:30 +0000 (18:06 +0100)]
Merge remote-tracking branch 'origin/release' into stable
Conflicts:
src/qml/qml/qqmlcompiler.cpp
Change-Id: I802731139d47c5b733dd805f7bf432d67d7331e1
Michael Brasser [Wed, 4 Dec 2013 17:06:35 +0000 (11:06 -0600)]
Use platform specified duration for triggering MouseArea::onPressAndHold.
Task-number: QTBUG-24793
Change-Id: Ib663197eac46a17bfc73aaa945a6a2d52beb0b38
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Sérgio Martins [Wed, 11 Dec 2013 10:02:17 +0000 (10:02 +0000)]
Don't crash when QCoreApplication is currently being deleted.
In debug mode fixes a crash. The next Q_ASSERT dereferrenced
QCoreApplication::instance().
In release mode fixes hundreds of messages about timers:
"QObject::startTimer: Timers can only be used with threads started
with QThread"
A case where this is reproducible is having a QQuickItem that's child
of qApp, or in some child hierarchy of qApp.
Change-Id: I3b506aefdb537b74dc0d6c755b6874d31be159a1
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Kai Koehne [Wed, 30 Oct 2013 15:59:04 +0000 (16:59 +0100)]
Fix autotests expecting a trailing whitespace for qDebug stream
The behavior of QDebug was fixed in qtbase. Update autotests
accordingly.
Change-Id: I36c442fb772ba35b71b6ab50b5f77a3f9c1463e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Gunnar Sletta [Mon, 18 Nov 2013 07:53:13 +0000 (08:53 +0100)]
Safeguard QQuickWindow::hide() against other GL contexts.
If another GL context is bound to another surface on the GUI
thread, we can run into issues while cleaning up the SG nodes.
Task-number: QTBUG-34898
Change-Id: Ifa02b7cdbc7ab38b3a149a21452cc5071498a7d1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Alan Alpert [Mon, 9 Dec 2013 08:06:37 +0000 (00:06 -0800)]
Stabilize Test
A slight variance on this number is acceptable, it should be using
extremelyFuzzyCompare like the rest of the checks on that property.
Task-number: QTBUG-35470
Change-Id: I9114a3a5d3bbc3c63253320637f7af1e5f21a896
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Martin Jones [Thu, 29 Aug 2013 07:48:29 +0000 (07:48 +0000)]
Add displayMarginBeginning/End to ListView and GridView.
This allows displaying content outside the visible area of
the view.
[ChangeLog][QtQuick] Add displayMarginBeginning/End to
ListView and GridView.
Change-Id: Idf9b5a0cd34a781c9603a9ad98ea189754972ba1
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Simon Hausmann [Wed, 11 Dec 2013 14:45:43 +0000 (15:45 +0100)]
Fix regression in QML string list concatenations
String lists and other QList property types (wrapped as QQmlSequence) should
behave like arrays and have the Array prototype. Therefore it should be
possible to pass them also as parameter to concat and they get composed
correctly, i.e. the individual items get appended instead of the list being
appened as one item. In the spec for concat this "special" casing should be
applied if the "class internal property" is "Array", and concat appears to be
the only place where this check is done. Therefore this patch adds another
exception to match the expected behavior in QML and extends the "internal
class is Array" meaning to QML list types.
This is a regression from Qt <= 5.1.x
Task-number: QTBUG-33149
Change-Id: Iab9522ac3c4ae6b746e790a99d87501b1cc1b655
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Robin Burchell [Sat, 7 Dec 2013 14:13:25 +0000 (15:13 +0100)]
tst_qquickflickable: unskip rebound on OS X
Out of 200 runs on 10.9 + stable branch, I have 0 failures.
Task-number: QTBUG-26696
Change-Id: I84de15b68dfff2cb5f141c5f2a783154db16b77e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Gunnar Sletta [Tue, 10 Dec 2013 11:25:21 +0000 (12:25 +0100)]
Size changes do not warrant a transform update.
The size is not a part of the matrix, so the matrix does
not need to be recomputed when the size of an element changes.
The exception from this is when using transform origin which
is already specialcased in the QQuickWindow::updateDirtyNode()
function.
Change-Id: I2c517880d39aa69232974f65da93333b7cba341d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Robin Burchell [Wed, 4 Dec 2013 21:18:36 +0000 (22:18 +0100)]
Set highlight size for both dimensions, irrespective of ListView orientation
The assumption that all list delegates are the same size (dependent on ListView
orientation) is not a correct one, even if it is correct most of the time.
Task-number: QTBUG-31626
Change-Id: Iba6f3bc5f38d60e3be7632ab17d0c66ab8e73965
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Oleg Shparber [Mon, 28 Jan 2013 21:12:59 +0000 (23:12 +0200)]
Flickable: Use increased default flick parameters on BB10
Due to the high resolution the display default flicking speed
is rather slow. This change introduces increased values of
QML_FLICK_DEFAULTMAXVELOCITY and QML_FLICK_DEFAULTDECELERATION
which feel closer to the native experience.
Also cleans up the flick variables a little by moving them to
their own header, so that QQuickPathView can also benefit from
the improved behavior on BB10.
Change-Id: I80878d4cc2a53a8f530b1dc8674f729f70a83119
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Robin Burchell [Sat, 7 Dec 2013 13:31:13 +0000 (14:31 +0100)]
Stabilise and remove insignificant marker from tst_qquickflickable.
A lot of work has gone into this test already since
a79839dc5287de1448d1fd858db312a7bfa7b581, such as
6ba7d88df623df5bce85bfdae853fc49006e76f2.
Everything passes for me locally, so let's skip specific tests if they break (or
better: fix them) instead of having no test coverage at all.
Change-Id: I29a7aeb26b106955c442da26df486cb6ce4bc92a
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Robin Burchell [Thu, 5 Dec 2013 01:47:34 +0000 (02:47 +0100)]
Fix up listening for layout direction changes.
Change the event type to ApplicationLayoutDirectionChange. LayoutDirectionChange
is sent for QWidgets only at present, and was wrong anyway: each widget may have
a different layoutDirection, but the application instance only has one -- tied
to ApplicationLayoutDirectionChange.
Relies on I2d2ac7dc07f11be5c7e501a3575b1d0978d8ac31 from qtbase to actually function.
Task-number: QTBUG-21573
Change-Id: Ibee25927b2213ae9145d46556698f54d5129bd06
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Thiago Macieira [Tue, 10 Dec 2013 18:31:04 +0000 (10:31 -0800)]
Use qCpuHasFeature because the check can be optimized out of existence
qCpuHasFeature also checks the compiler flags of this particular build.
If the feature was enabled by the compiler in this .cpp, then no runtime
check is performed and the test becomes an unconditional true.
Change-Id: Ibb7d333e59a0f4ed06b7d0056547177fd69658a0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Michael Brasser [Thu, 5 Dec 2013 18:53:09 +0000 (12:53 -0600)]
Mark item as dirty when nodes are cleaned
Otherwise they may not be recreated in the correct configuration.
Change-Id: Ib103b1874d7f104680eae7b6f43f722b5fa93bf2
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Simon Hausmann [Tue, 10 Dec 2013 14:25:22 +0000 (15:25 +0100)]
Fix broken Maroon game / regression in PropertyChanges {} element
Commit
0aadcf8077840068eb182269e9ed9c31ad12f45e that pre-compiles the
expressions in PropertyChanges {} introduced a regression in where the
evaluation context was incorrect and thus bindings would not be able to
access the correct properties. For example
PropertyChanges {
target: someObject
y: height / 2
}
Here height should be looked up in the context of "someObject", not of the
PropertyChanges element.
This patch introduces an auto-test that verifies that the lookup context is
correct and fixes the bug by disabling accelerated compile time property
lookups for binding expressions that are requested from a custom parser.
Change-Id: I5cb607d07211b453ddfc9928ccbf5f9ecec85575
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
J-P Nurmi [Tue, 10 Dec 2013 11:11:14 +0000 (12:11 +0100)]
QSGRenderer: sanity check attribute regs only when QSG_SANITY_CHECK=1
The sanity check that attribute registers are disabled that was always
done in debug mode took roughly 16ms on my machine and caused a trivial
QML animation to eat 100% CPU.
Task-number: QTBUG-35443
Change-Id: I8ba2a80db341d17e08216b3cad1678dd59b9b1a5
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Erik Verbruggen [Thu, 5 Dec 2013 12:14:05 +0000 (13:14 +0100)]
V4: change variable renumbering algorithm from recursive to iterative.
Replace the recursive calls and subsequent clean-ups by pushing actions
on a to-do stack, and processing that stack in a loop.
Change-Id: I83536e88d400592b6e9f5fda3d795e41711a131a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Friedemann Kleint [Wed, 4 Dec 2013 14:24:33 +0000 (15:24 +0100)]
Windows: Use Shell API for checking file case correctness.
The old method of converting to short 8.3 name and back does
not work for drives where this is disabled.
Change-Id: Ia0a46331a31eeb61578c31ba063a80665d5fc25c
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Ulf Hermann [Fri, 6 Dec 2013 12:57:36 +0000 (13:57 +0100)]
Correctly profile the size of loaded pixmaps
Only set the sizes when they're known, prefer request size to implicit
size (as the request size is what ends up in the cache), and don't set
the size twice.
Task-number: QTBUG-35337
Change-Id: Ie516a1cae2d9050f61362ee99cf8a6a9dd8ea3bb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>