platform/upstream/qtdeclarative.git
10 years agoFix compiler warning
Lars Knoll [Tue, 6 May 2014 11:30:31 +0000 (13:30 +0200)]
Fix compiler warning

Change-Id: I26df4f1b8417c6b075d81eaf118669a4103503e2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoUse the correct 'no-widgets' check
Gunnar Sletta [Wed, 18 Jun 2014 12:02:00 +0000 (14:02 +0200)]
Use the correct 'no-widgets' check

Change-Id: I754f785625a534886c6c40f1e850b90cf2418297
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoV4 JIT: teach regalloc about callee-saved registers.
Erik Verbruggen [Thu, 22 May 2014 12:45:59 +0000 (14:45 +0200)]
V4 JIT: teach regalloc about callee-saved registers.

Callee-saved registers won't get clobbered by a call, so any value
stored in it will survive the call.

Change-Id: I2b61b84617b01bf7ce7e81cd0119a6da689ee9d5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev
Sergio Ahumada [Tue, 17 Jun 2014 06:51:08 +0000 (08:51 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev

10 years agoIntroduce Accessible.ignored
Frederik Gladhorn [Fri, 23 May 2014 11:53:11 +0000 (13:53 +0200)]
Introduce Accessible.ignored

Task-number: QTBUG-39163
Change-Id: Ic09573408c460c64503cf1c4d6fff3754e92a223
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into dev
Simon Hausmann [Fri, 13 Jun 2014 21:10:03 +0000 (23:10 +0200)]
Merge remote-tracking branch 'origin/5.3' into dev

Conflicts:
src/quickwidgets/qquickwidget.cpp

Change-Id: Id4b080aea713df68608847bb82570231e37ce536

10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Simon Hausmann [Fri, 13 Jun 2014 14:45:46 +0000 (16:45 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: I9cff3f4d42d58157fd8d17ec172b6a74dc386508

10 years agoV4 JIT: use RegisterInfo in the register allocator.
Erik Verbruggen [Thu, 22 May 2014 12:31:03 +0000 (14:31 +0200)]
V4 JIT: use RegisterInfo in the register allocator.

Change-Id: Ia9faeb20b360f41d00f908132fd306e2d25c7574
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoSet StrongFocus on QQuickWidget
Laszlo Agocs [Thu, 12 Jun 2014 13:10:51 +0000 (15:10 +0200)]
Set StrongFocus on QQuickWidget

Make text input functional out of the box.

Both QGraphicsView and QDeclarativeView (QQuick1) do this so there
is no reason to do this differently for QQuickWidget. For QQuickWindow
and QQuickView the issue does not exist in the first place, they will
accept the focus by default.

Task-number: QTBUG-39605
Change-Id: I74f01b85342df51aa3c0e80baf58ba1619c63438
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 RegAlloc: simplify algorithm after introducing half open ranges.
Erik Verbruggen [Wed, 14 May 2014 15:17:59 +0000 (17:17 +0200)]
V4 RegAlloc: simplify algorithm after introducing half open ranges.

Now that all ranges are half open, and temporaries are defined at the
end of the (defining) statement, the linear scan algorithm get simpler.
Specifically, when allocating a register for a temporary, the check if
the temporary is defined or used is not needed anymore.

Another simplification is the handling of phi-nodes. Previously they
shared the same statement number as the first "real" statement in a
basic-block, and special checks were needed to handle them. Those are
now gone too.

Change-Id: Ia4266ea5ede8c2aff0e70c6579fba9575c6719fb
Sanity-Review: Qt Sanity Bot <qt_sanitybot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4 RegAlloc: change life-time intervals from closed to half-open.
Erik Verbruggen [Wed, 14 May 2014 12:44:27 +0000 (14:44 +0200)]
V4 RegAlloc: change life-time intervals from closed to half-open.

There are two changes in this patch, that go hand-in-hand. First, when
re-numbering the statements in order of occurrence in the scheduled
basic-blocks, the (new) position is not stored in the statement itself,
but in the LifeTimeIntervals class. This makes it possible to re-use
information gathered during SSA formation or optimization.

The re-numbering itself has also changed, resulting in some minor
changes to the life-time interval calculation. The new numbering
is described in LifeTimeIntervals::renumber(). The reason is to make it
easy for the register allocator and stack-slot allocator to distinguish
between definition of a temporary and its uses. Example:

  20: %3 = %2 + %1
  22: print(%3)

If the life-time of %2 or %1 ends at 20, then at the point that %3 gets
assigned, it can re-use the storage occupied by %1 or %2. Also, when
both %1 and %2 need to get a register assigned (because they were
spilled to the stack, for example), %3 should be allocated "after" both
%1 and %2. So, instead of having a closed interval of [20-22] for %3, we
want to use an open interval of (20-22]. To simulate the "open" part, the
life-time of %3 is set to [21-22]. So, all statements live on even
positions, and temporaries defined by a statement start at
statmentPosition + 1.

Change-Id: I0eda2c653b0edf1a529bd0762d338b0ea9a66aa0
Sanity-Review: Qt Sanity Bot <qt_sanitybot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoAdd support for translations in pure QJSEngine based environments
Simon Hausmann [Fri, 6 Jun 2014 10:42:23 +0000 (12:42 +0200)]
Add support for translations in pure QJSEngine based environments

Re-add the QScriptEngine::addTranslatorFunctions API that brings back
qsTr() and friends to pure QJSEngine based environments.

The auto-test were also ported where applicable.

Change-Id: Ib03e3495ef09eeea9e4c8341061499768caed307
Sanity-Review: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDoc: Clarify where JavaScript fits in QML code
Sze Howe Koh [Wed, 11 Jun 2014 23:24:17 +0000 (07:24 +0800)]
Doc: Clarify where JavaScript fits in QML code

- Rewrite the introductory list.

- Rewrite the section about application startup code.

- Flatten sections. Previously, there were two \section1 headings:
  "JavaScript Expressions in QML Objects" and "Running JavaScript at
  Startup". This split wasn't very natural, as startup code needs to be
  called from an object, while imported JS files aren't in objects.

- Some minor formatting/wording changes in unrelated areas.

Change-Id: Ie08f94e2ea77ca84f80491c782bc30612f7ef698
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoProperly initialize heap profiler when starting profiling
Ulf Hermann [Thu, 12 Jun 2014 12:33:05 +0000 (14:33 +0200)]
Properly initialize heap profiler when starting profiling

Change-Id: Ia994464b2150dc9a9185280ae0e2f8c615393310
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix EllipseShape for Affectors in QtQuick.Particle
Daniel Oberländer [Thu, 29 May 2014 19:37:54 +0000 (21:37 +0200)]
Fix EllipseShape for Affectors in QtQuick.Particle

EllipseShape was theated like rectangles if set as shape in an Affector
due to an unimplemented containment check (was marked as TODO in source
code). This fix implements the missing check.

Change-Id: I8df1406f147c56e799531fccf4963110c9fdd8ef
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoInitialize QSGPaintedNode with an empty size.
Gunnar Sletta [Thu, 12 Jun 2014 08:02:55 +0000 (10:02 +0200)]
Initialize QSGPaintedNode with an empty size.

Failing to do so would cause it to not update its size when set to 1x1
which in turn would cause it to never update its texture, causing crashes
later during rendering.

Task-number: QTBUG-39555
Change-Id: I099d9ef2d6968ece21f7c03819abfd6685bec430
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAdd node description to painted items.
Gunnar Sletta [Thu, 12 Jun 2014 08:07:59 +0000 (10:07 +0200)]
Add node description to painted items.

Change-Id: I47ad9df1550649131ac5379acbf7d133088c60a8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMake sure shader rewriter stops immediately on an empty string.
Gunnar Sletta [Mon, 9 Jun 2014 08:42:08 +0000 (10:42 +0200)]
Make sure shader rewriter stops immediately on an empty string.

The 'invalid' token didn't really serve a purpose. If a string contains
0 for any reason, it one has reached the end.

Task-number: QTBUG-39505
Change-Id: I3fc9b8f28dc223386a72bbfa28f70fcca0fde223
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoDoc: Fix qmlclass selector used in documentation config
Topi Reinio [Wed, 11 Jun 2014 15:04:35 +0000 (17:04 +0200)]
Doc: Fix qmlclass selector used in documentation config

A recent change (46959875) in qdoc raised QML types from
subnodes to top-level nodes. This change modifies the
documentation configuration file(s) accordingly.

Change-Id: Ic457d20368979aa15b546dceaf84fa2fb2d31091
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoFix forwarding of keyboard events to multiple target items
Joni Poikelin [Mon, 9 Jun 2014 11:50:29 +0000 (14:50 +0300)]
Fix forwarding of keyboard events to multiple target items

Fix regression when multiple items are set to Keys.forwardTo attached
property. QML items accept key events automatically and event should be
by default in accepted state when entering handler.

Task-number: QTBUG-39168
Change-Id: Ibf6c163c4059269996113634efa48ad2fe4d838d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoFurther improve the StocQt demo
Topi Reinio [Tue, 27 May 2014 11:18:00 +0000 (13:18 +0200)]
Further improve the StocQt demo

- Display the price scale on y-axis, highest trade volume on x-axis
- Adjust grid size for the chart based on the active view
- Fix incorrect drawing of volume data
- Correctly scale the chart based on the price/volume ranges
- Align the volume graph to the price chart and improve its look
- Use Date.toDateString() instead of hardcoded month names
- Minor fixes to layout

Task-number: QTBUG-38254
Change-Id: I0e7ef18a152c7678371fb9c01f86d3d91a289472
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Sergio Ahumada [Wed, 11 Jun 2014 08:03:38 +0000 (10:03 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: I595002245ffee7aa739ce6ee9806cf509a5e7405

10 years agoDrag&Drop support for child items in QQuickWidget
Paul Olav Tvete [Tue, 10 Jun 2014 09:09:21 +0000 (11:09 +0200)]
Drag&Drop support for child items in QQuickWidget

This is a quick-fix. The real issue is that QWidget and QWindow
reacts differently when a QDragEnterEvent is rejected.

Change-Id: I3e3e50610c14acfaada9c1b243b88cfe9eae54b2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoAdd FreeBSD support to qv4targetplatform_p.h
Dmitry Shachnev [Thu, 5 Jun 2014 17:57:01 +0000 (21:57 +0400)]
Add FreeBSD support to qv4targetplatform_p.h

Currently, that code only works on Linux, Windows, Mac OS X
and QNX on x86 and x86_64 processors.

Change-Id: I07f2cb4cb9b8556d4bcd681c6a1f997dc3897901
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 years agoStop polish-and-sync timer when the window is destroyed
Laszlo Agocs [Fri, 6 Jun 2014 13:02:21 +0000 (15:02 +0200)]
Stop polish-and-sync timer when the window is destroyed

The threaded render loop continues to run the polish-and-sync timer for
ever in case the QQuickWindow is destroyed while the timer is active.
Instead of pumping the timer events on the render thread for ever, the
timer has to be killed somewhere.

Change-Id: I8e458624e26ebfacb6cc69a4f2fbb3da57ae5e0e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoadd missing signal declaration in Exposing Attributes to QML example
Shawn Rutledge [Tue, 13 May 2014 13:29:06 +0000 (15:29 +0200)]
add missing signal declaration in Exposing Attributes to QML example

Task-number: QTBUG-33985
Change-Id: Id6a2a51467ee5de44bf51fb48e3f9346a832f8f2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoJavascript heap profiler
Ulf Hermann [Mon, 2 Jun 2014 16:33:19 +0000 (18:33 +0200)]
Javascript heap profiler

This profiler tracks every memory allocation and deallocation, by the
MemoryManager as well as the V4 VM, and exposes them as a stream of
events to the profiler service.

Change-Id: I85297d498f0a7eb55df5d7829c4b7307de980519
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 IR: Store positions for life-time intervals outside the statement.
Erik Verbruggen [Tue, 13 May 2014 14:32:35 +0000 (16:32 +0200)]
V4 IR: Store positions for life-time intervals outside the statement.

The statement ids are now stable, so the life-time interval calculation
can re-use information calculated by the optimizer. This re-use will
be done in a separate patch.

It also allows for changes to the numbering in a non-intrusive way. This
will also come in a later patch.

Change-Id: Ie3a2e1d9e3537cc8070ff3e3007f3a5e8ca0579a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 IR: add def statements to the worklist when removing uses.
Erik Verbruggen [Tue, 13 May 2014 11:05:25 +0000 (13:05 +0200)]
V4 IR: add def statements to the worklist when removing uses.

When removing a phi node, add the def statement for the (previously)
used temps to the worklist. These statements might now be eligible for
further optimizations (specifically removal when there are no uses
left).

Change-Id: I05d7c7bc0a243d328b5f9d1c2dcc53a10bd7491d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd support for multisampling in QQuickWidget
Laszlo Agocs [Wed, 4 Jun 2014 13:05:00 +0000 (15:05 +0200)]
Add support for multisampling in QQuickWidget

Use a multisampled fbo when the requested format has samples > 0.
Resolving happens after each rendering of the scene.

The blit to the temporary non-multisampled fbo could be avoided,
in theory, by sending the fbo instead of the texture id down the
stack and performing a blit directly to fbo #0. This however
involves a number of potential issues, for example due to the
non-sharability of FBOs between contexts. Hence it is left as a
future exercise.

Task-number: QTBUG-39187
Change-Id: Iae98b969bcbc3bb57e6d73288496f5428913c826
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 IR: replace hashes by vectors.
Erik Verbruggen [Mon, 12 May 2014 14:33:49 +0000 (16:33 +0200)]
V4 IR: replace hashes by vectors.

Speeds up the register allocation by another 20%.

Change-Id: I8c638d09e1b96f400e3e101a000bc73b02d79165
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRemove copy and accidental detach.
Erik Verbruggen [Mon, 12 May 2014 14:31:14 +0000 (16:31 +0200)]
Remove copy and accidental detach.

Change-Id: Iedd751424ff0b651ba9e00a30f50e197ecd7967d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoKeep QML and JS messages separate in QQmlProfilerService test
Ulf Hermann [Wed, 4 Jun 2014 08:48:47 +0000 (10:48 +0200)]
Keep QML and JS messages separate in QQmlProfilerService test

Like that we can deal with misbehaving clocks in the tested
application.

Task-number: QTBUG-39169
Change-Id: Ia9f9844efb6f20508bccac3ca2d593d01d55fc83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoProperly support all events in trace files and clean up a bit.
Ulf Hermann [Wed, 19 Feb 2014 17:11:41 +0000 (18:11 +0100)]
Properly support all events in trace files and clean up a bit.

In particular, use both message and range type to identify events so
that we can get rid of the messy type aliasing.

Task-number: QTBUG-36953
Change-Id: I691a7501aa285f78f7ce5b7017ef50628f44fcf7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 Yarr JIT: push/pop addressTempRegister.
Erik Verbruggen [Thu, 5 Jun 2014 12:13:39 +0000 (14:13 +0200)]
V4 Yarr JIT: push/pop addressTempRegister.

Change 6572d4e50d73ac60a8974d07de74c27a7f99ebef moved the
addressTempRegister from r3 to r10, so that calculated calls would not
overwrite the fourth argument of a call. However, JSC's Yarr JIT might
also use it for certain loads, so it also needs to save r10.

Task-number: QTBUG-39289
Change-Id: I0a4e725b6b11ab5e772330662049668bed009c05
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 RegAlloc: store, pass, and use life-time intervals by pointer.
Erik Verbruggen [Mon, 12 May 2014 11:33:48 +0000 (13:33 +0200)]
V4 RegAlloc: store, pass, and use life-time intervals by pointer.

By storing LifeTimeIntervals by pointer (instead of by value), other
data-structures can safely use pointers too. This removes a lot of
copies, especially in vectors that act as worklists.

Also change the order of the "unhandled" list of intervals to be sorted
in descending order. Not only is this more efficient, but it also
removes the need to reverse the results of the life-range calculation
(which produces the list in exactly this order).

This change speeds up register allocation by about 20%.

Change-Id: I6ea3dcd110f250d9ccc881753dc7392510a26d87
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix opacity issue in the renderer.
Gunnar Sletta [Wed, 4 Jun 2014 16:59:58 +0000 (18:59 +0200)]
Fix opacity issue in the renderer.

Given the following tree:

OpacityNode
    |
TransformNode (which is a batch root)
    |
GeometryNode

If both opacity and transform nodes were changed this frame, we would
hit the optimized "scrolling" path while traversing the tree and abort
updating that subtree. As a result the opacity change was not
propegated to the geometry node and it would be rendered incorrectly.

Fix this by skipping the optimized path when there are opacity changes
in an ancestor.

Task-number: QTBUG-39190
Change-Id: Ieaebfe3de62b961204bd3103fe9913d60e75e412
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix QQuickWidget offscreen surface format and creation order
Laszlo Agocs [Thu, 5 Jun 2014 13:16:33 +0000 (15:16 +0200)]
Fix QQuickWidget offscreen surface format and creation order

Create the QOffscreenSurface together with, and after, the QOpenGLContext.
This is essential to get a surface that is compatible with the context and
is in line with the QOffscreenSurface usage recommendation from the docs.

Otherwise, if the offscreen surface gets created first, without
knowing what _actual_ format (e.g. EGL configuration) the context
will use, the result is an incompatible surface and context on
systems that offer a different set of configurations for window and
pbuffer surfaces.

This fixes QQuickWidget on EGL implementations that offer both 16 and 24
bit pbuffer configs, but only 24 (or 32) bit window configs.

Task-number: QTBUG-39474
Change-Id: I43925d2b25e28d26d172ce9d22651c25b281b832
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoOptimize the way AnimatedImage display its content
Louis du Verdier [Thu, 5 Jun 2014 06:44:16 +0000 (08:44 +0200)]
Optimize the way AnimatedImage display its content

Since QtQuick2, the AnimatedImage component is less efficient than it
was with QtQuick1, using more CPU and RAM.

This commit makes it upload when required each animation frame as a
cached texture (using QQuickPixmapCache) to speed up the component.

Task-number: QTBUG-38921
Change-Id: I7ab0b5f47ecec6cb3cdded0dd219d6acc1bc4148
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDoc: Removed redundant link to section in the same page.
Jerome Pasion [Tue, 3 Jun 2014 13:52:49 +0000 (15:52 +0200)]
Doc: Removed redundant link to section in the same page.

There is no need to refer to a different section as it is understood
that those instructions apply to all examples.

Change-Id: I2d0d2d6cbf84790bc4ca2f3deda57ab5d3d1c6c1
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoDoc: Updated "Qt Quick Examples" pages.
Jerome Pasion [Wed, 28 May 2014 14:19:08 +0000 (16:19 +0200)]
Doc: Updated "Qt Quick Examples" pages.

-added instructions about running the example (using \include)
-used the example names as sections in the collection pages
-general editing and documentation polishing
-updated copyright information

Change-Id: I044f29fcc1921a541040505d5821acb06dc4cb35
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoCleanup: Get rid of the url and file name members in QQmlCompiledData
Simon Hausmann [Wed, 4 Jun 2014 15:32:31 +0000 (17:32 +0200)]
Cleanup: Get rid of the url and file name members in QQmlCompiledData

This is part of the effor of moving members from QQmlCompiledData into
QV4::CompilationUnit in order to eliminate the former in the long run.

Change-Id: Icce7fe0ee9a49cb3a7677fd7020008fc55ecdcf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDetect and warn when using QQuickWidget as a native child
Laszlo Agocs [Wed, 4 Jun 2014 10:42:11 +0000 (12:42 +0200)]
Detect and warn when using QQuickWidget as a native child

This is not supported.

Change-Id: I19ed485ee629baa4f3631770ab0c730e0ef6748e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoProcess children first when delivering drag events
Aleix Pol [Thu, 24 Apr 2014 18:22:10 +0000 (20:22 +0200)]
Process children first when delivering drag events

[ChangeLog][QtQuick][Important Behavior Changes] Drag and Drop events
now propagate to child items before their parents.

Change-Id: I22832d707c7cb2461eaa94d659c5cc83506def8d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoUse the correct precision specifier in visualizer GLSL.
Gunnar Sletta [Tue, 3 Jun 2014 11:01:49 +0000 (13:01 +0200)]
Use the correct precision specifier in visualizer GLSL.

Task-number: QTBUG-39119
Change-Id: I0ec4909167f5694ce4229df8202c89742be21d0a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agoFix bindings to when property of States not always working
Simon Hausmann [Wed, 4 Jun 2014 11:49:50 +0000 (13:49 +0200)]
Fix bindings to when property of States not always working

The "when" property is of type QQmlBinding* and we special case that type when
writing property bindings. However in order for that to work, the meta-type for
QQmlBinding* needs to be registered at the point in time when resolving
properties in the type compiler. In Qt 5.1/5.2 this worked by accident due to
a different code paths that implicitly registered the meta-type earlier from a
different location.

There are a couple of property types for which we have special handling, such as
QQmlV4Handler and QJSvalue, besides QQmlBinding*. We do register them explicitly
at engine initialization time, and therefore we should also initialize the meta-type
for QQmlBinding* there.

Task-number: QTBUG-39421
Change-Id: Iec8609848b632afa52aa42cf0b807330c74f6f3a
Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
10 years agoFix method overload calling of Qt slots from JavaScript
kh1 [Wed, 4 Jun 2014 11:17:30 +0000 (13:17 +0200)]
Fix method overload calling of Qt slots from JavaScript

After commit ac57f185d1a2203cd4b585df7bd7af01c3ec33ed we succeed in selecting
the correct overload based on the supplied arguments. However when calling
slots on objects without a property cache, we end up using the local "dummy"
variable to store the synthetic propert data. We also store the currently best
patch in the "best" variable, which is a _pointer_ to the property data of the
match. Suppose we have 5 overloads to choose from, we find that the 3rd is
the best. Then we try the fourth but find it unsufficient and break out of
the loop. Unfortunately the "dummy" property data at this point contains the
data of the fourth (wrong) overload, and our best match variable points to it.
So then when we finally call the method, we do it based on the wrong property
data.

The easy patch is to simply copy the few bytes of property data, so "best" is
stored by value instead of pointer.

Change-Id: Ie2ebbdb88a117770b6c7b9490e1c634077020e9d
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Simon Hausmann [Tue, 3 Jun 2014 13:28:51 +0000 (15:28 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

The merge conflict is about the removal of "d1" from the register
set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e

The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b
was reverted to what it was before, per Laszlo's advice.

Conflicts:
src/qml/jit/qv4isel_masm.cpp

Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b

10 years agoMake ItemViews displayMargin work correctly when set to negative values
Albert Astals Cid [Thu, 15 May 2014 08:02:43 +0000 (10:02 +0200)]
Make ItemViews displayMargin work correctly when set to negative values

We need to call forceLayoutPolish instead of refillOrLayout
so that the visibility is correctly updated. Also update one
line that sets visibility in GridView

Change-Id: I29fa67cdd5196a744fab9507b4104cb83ad4bf5e
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years agoFix worker scripts with cached compilation units
Simon Hausmann [Mon, 2 Jun 2014 12:50:00 +0000 (14:50 +0200)]
Fix worker scripts with cached compilation units

Try to retrieve them from the compilation unit cache instead of from
the file system if possible. The evaluation code can be shared.

In the long run it would be nice to use the type loader here and allow for
worker scripts to have dependencies/imports. But that is a more intrusive
change given the typeloader's dependency on the engine.

Change-Id: I7f9d6be1ff31433d4b14607cf0c25acdf466ac67
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoRework custom parser integration
Simon Hausmann [Fri, 25 Apr 2014 14:19:02 +0000 (16:19 +0200)]
Rework custom parser integration

The custom parser design used to be so that the custom parser operates on the "AST",
creates its own binary representation of the data it needs, stores it in a QByteArray
and gets that at object instantiation time. That meant serializing everything necessary.
With the introduction of the "binary" QML data structure, that process of serialization
becomes obsolete and would require extra work in the custom parsers for example for QQuickStates
to store the translation parameters.

The clean solution is to eliminate this unnecessary serialization process and
instead let the custom parsers do a verification pass at type compile time and
then simply operate directly on the QV4::CompiledData::Bindings at object
instantiation time. That simplifies the code, and allows for support of
translations throughout all list model properties.

Additionally this speeds up the creation of state objects and reduces memory
consumption. Previously a text: qsTr("foo") binding in states would result in
an actual java script binding. After this patch it is merely stored as a string
and translated at object instantiation time.

Change-Id: I7550274513f54abb09a0ab4de51c4c0bcdb23cae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoMake QQuickRenderControl usable (still private)
Paul Olav Tvete [Tue, 3 Jun 2014 12:19:14 +0000 (14:19 +0200)]
Make QQuickRenderControl usable (still private)

QQuickRenderControl needs a QQuickWindow in order to function. This
required the use of a private QQuickWindow constructor, meaning that
only friend classes of QQuickWindow could use QQuickRenderControl.

This change adds a factory function, QQuickRenderControl::createOffscreenWindow().

Task-number: QTBUG-38996
Change-Id: I92f6f1f60045934f3dd33c300352247852463c73
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix crash in QSGRenderContext::invalidate().
Yoann Lopes [Fri, 23 May 2014 13:54:05 +0000 (15:54 +0200)]
Fix crash in QSGRenderContext::invalidate().

QSGRenderContext was holding pointers to QFontEngines without
increasing the font engine's ref count, allowing them to be deleted
before QSGRenderContext could make use of them.

Task-number: QTBUG-36573
Task-number: QTBUG-38313
Change-Id: I0ed28bb44882c55f330c27c23b533b7999d7e04b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoPrevent initial clipping in Context2D
Ulf Hermann [Mon, 2 Jun 2014 10:17:10 +0000 (12:17 +0200)]
Prevent initial clipping in Context2D

Don't set an initial clip path and only start clipping once a clip
path has manually been set.

Task-number: QTBUG-39114
Change-Id: Id277775d6eb0be87bead0e5d076f32a07ebdfe5c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 IR: lower the number of memory allocations.
Erik Verbruggen [Mon, 12 May 2014 09:24:08 +0000 (11:24 +0200)]
V4 IR: lower the number of memory allocations.

By using vectors indexed on temp-id instead of hashes.

Also record the order in which intervals are removed from the list of
life ranges. This order is the inverse of the list of ranges sorted by
start position. So instead of building _sortedIntervals and then sorting
them, reverse iterating over the finished intervals will do the same.

This speeds up the interval calculation by 40%.

Change-Id: If3c78496d7ca2d0e23f0a51302dcd1094dad7d4a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRecognize "in" keyword in vertex shaders
Laszlo Agocs [Mon, 2 Jun 2014 10:07:13 +0000 (12:07 +0200)]
Recognize "in" keyword in vertex shaders

Checking only for "attribute" is not sufficient: with newer GLSL versions
"in" is used.

Task-number: QTBUG-39143
Change-Id: Ibdb5940f5aba1485ecaad2e2c4a3aa7150af6d99
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDestroy the FBO in QQuickWidget while a context is current
Laszlo Agocs [Mon, 2 Jun 2014 08:21:56 +0000 (10:21 +0200)]
Destroy the FBO in QQuickWidget while a context is current

When creating the new FBO, it will try to restore the previous FBO
after initialization. The internal tracking of the current FBO goes
horribly wrong when a QOpenGLFramebufferObject is destroyed with
no context current. In 5.4 the problem is solved by removing the
tracking altogether. Here QQuickWidget is fixed to play nice and
destroy QOpenGLFramebufferObject always with the context current.

Task-number: QTBUG-39389
Change-Id: Ic6917696ed61f284d661a578c9c7f2e0673c412d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix QQuickWidget cleanup and invalidation sequence
Laszlo Agocs [Fri, 30 May 2014 11:53:25 +0000 (13:53 +0200)]
Fix QQuickWidget cleanup and invalidation sequence

Make sure the context/surface are still alive and current while destroying
the render control.

Task-number: QTBUG-39034
Change-Id: I6ff0069985a9121a63025bfb165493b3f003391d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoTextInput: implement the new input method API
J-P Nurmi [Wed, 21 May 2014 17:41:54 +0000 (19:41 +0200)]
TextInput: implement the new input method API

Change-Id: I8a2f66a6cfa346627394705741d2f47affcd0c2b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoDump all received messages if tst_QQmlProfilerService fails
Ulf Hermann [Mon, 2 Jun 2014 14:32:16 +0000 (16:32 +0200)]
Dump all received messages if tst_QQmlProfilerService fails

Without all the context we can't really tell what happened.

Task-number: QTBUG-39169
Change-Id: Ic5192498440a0d55c279549243dfce65f8168317
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: teach the disassembler about VMUL, VCVT, and VCMP on ARM.
Erik Verbruggen [Fri, 16 May 2014 12:46:58 +0000 (14:46 +0200)]
V4: teach the disassembler about VMUL, VCVT, and VCMP on ARM.

Change-Id: I2fee1d9d8c9b6437e6237388f2b0d93243fe601d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: support calling constants.
Erik Verbruggen [Fri, 9 May 2014 11:10:16 +0000 (13:10 +0200)]
V4: support calling constants.

Consider:
  function f() {
    var a;
    a();
  }

Here the constant propagation will propagate the value for a (undefined)
to the call site. This was not yet handled, resulting in Q_UNIMPLEMENTED
warnings when running a debug build.

Change-Id: I5f85f681d975b54df7a9e00bd5b50e6f4350139a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDisable qmlscene and qmlplugindump when doing static builds
Simon Hausmann [Mon, 2 Jun 2014 08:16:07 +0000 (10:16 +0200)]
Disable qmlscene and qmlplugindump when doing static builds

Both of these tools rely on the ability to load plugins in order to function.
QmlScene in particular can theoretically be used with just "QtQml" imports
and QObjects, but that's not very useful for the _scene_ type of applications
qmlscene is intended for ;-). And in a static build it can't load QtQuick.

Task-number: QTBUG-39003
Change-Id: I0d4328dc4eb5c4e3153668e65a12f8eb3757f660
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 IR: make the local-with-temp substitution into a separate pass.
Erik Verbruggen [Wed, 7 May 2014 14:42:49 +0000 (16:42 +0200)]
V4 IR: make the local-with-temp substitution into a separate pass.

This makes it easier to turn it off when needed.

Change-Id: I1a9f2882dd7a1ad7bc76143e3c44e4677e49357a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoKeep the internal state about the bound fbo up to date
Laszlo Agocs [Fri, 23 May 2014 08:27:49 +0000 (10:27 +0200)]
Keep the internal state about the bound fbo up to date

When binding an FBO directly via glBindFramebuffer, the QOpenGLContext's
internal current_fbo, that is maintained by QOpenGLFramebufferObject,
becomes out of sync. This will lead to QOpenGLFramebufferObjects thinking
they are still bound.

This fix prevents ShaderEffect items in QQuickWidget from complaining
about "'recursive' must be set to true when rendering recursively". Ideally
the entire tracking of the current fbo should be removed, since it cannot
be done robustly enough, but that will likely happen in 5.4 only.

Task-number: QTBUG-38994
Change-Id: I39015d90bb2e0985d2a084b79ffe2004a9bc9f07
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 IR: clean up DefUses(Calculator)
Erik Verbruggen [Wed, 7 May 2014 12:54:02 +0000 (14:54 +0200)]
V4 IR: clean up DefUses(Calculator)

Previously, the DefUsesCalculator was a pass over the IR to find all
definitions and uses of temps. This is now merged with the variable
renaming when transforming into SSA form, where all definitions and all
uses are already visited (and changed). As it no longer calculates
anything, the class is also renamed to DefUses.

The interface is also cleaned up, as are all usages. This involved some
small changes to the data-structures storing return values from DefUses.

Change-Id: I40e665f5dee6144fc81066fbf6950355ebe8dfa4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoQNX: Fix qquicktext auto test
Bernd Weimer [Thu, 24 Apr 2014 16:21:48 +0000 (18:21 +0200)]
QNX: Fix qquicktext auto test

Change-Id: I06acf7dcd6e83c6b665163f4eb9e5ee55ecf85b2
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix potential null pointer dereferencing
Frederik Gladhorn [Wed, 14 May 2014 16:45:03 +0000 (18:45 +0200)]
Fix potential null pointer dereferencing

These were found by
http://www.viva64.com/en/b/025
most issues are rather cosmetic.

Change-Id: I7cc12610aae6a43d26bedb9b480863c0695ddfa3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix copy and paste error
Frederik Gladhorn [Wed, 14 May 2014 11:50:32 +0000 (13:50 +0200)]
Fix copy and paste error

Fix first error "Null pointer dereferencing" identified by static analysis from
http://www.viva64.com/en/b/0251/

Change-Id: I984d6ac2c22fddfe5ccb507f5d95d3329bed0563
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix AccessibleAttached property documentation
Frederik Gladhorn [Thu, 22 May 2014 12:19:12 +0000 (14:19 +0200)]
Fix AccessibleAttached property documentation

Task-number: QTBUG-37908
Change-Id: Ib8cfa284c2be522628359f7585b0a96addfd5ed4
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoDon't add the database before verification
Rob Hoelz [Tue, 22 Apr 2014 05:11:25 +0000 (00:11 -0500)]
Don't add the database before verification

The local storage facility exposed to QML has a bug; if you attempt to
open a versioned connection, the version is wrong, and you try to handle
that error, the connection is still stored in a connection pool, but in
an unopened state.  The next time you attempt to connect, no matter if
you have the version right or not, the database handle will complain
about being unopened.

See also http://qt-project.org/forums/viewthread/38458/

Task-number: QTBUG-38543
Change-Id: I921b94621009f4968144e1cc513c17b4924a792a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoFix emission of QQmlListModel::rowsAboutToBeXxx() signals
J-P Nurmi [Tue, 27 May 2014 12:14:52 +0000 (14:14 +0200)]
Fix emission of QQmlListModel::rowsAboutToBeXxx() signals

Call beginInsertRows(), beginMoveRows() and beginRemoveRows() before
the change to ensure that rowsAboutToBeInserted(), rowsAboutToBeMoved()
and rowsAboutToBeRemoved() get emitted before the change as appropriate.

NOTE: This patch solves the problem for the most common use case, when
ListModel is used without WorkerScript. QQmlListModelWorkerAgent needs
similar changes in order to fix the signals when ListModel is used with
WorkerScript (QTBUG-39321).

Task-number: QTBUG-39279
Change-Id: Idec5167d70b242f6f7d8b7cff008e130afc62505
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix QSGPlainTexture object leak
Liang Jian [Wed, 28 May 2014 04:48:56 +0000 (12:48 +0800)]
Fix QSGPlainTexture object leak

Delete m_texture in the destructor of QSGTextMaskMaterial class

Change-Id: I0f3c59d2c5f094dcbc02eafa6ed782d16315eb44
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoV4 IR: make statement numbering fixed and clean up statement worklists.
Erik Verbruggen [Wed, 7 May 2014 09:02:32 +0000 (11:02 +0200)]
V4 IR: make statement numbering fixed and clean up statement worklists.

Every statement in the IR now gets a fixed unique number. This number
can be used to store statements or information for a statement into an
array where the number is used as an index. This removes the need for
many hashes.

In the process of changing the code the two statement worklists in the
optimizer are merged into one. A single instance can be (and is) re-used
by the various algorithms.

Change-Id: I8f49ec7b1df79cf6914c5747f5d2c994dad110b2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix tst_textinput.qml
Bernd Weimer [Wed, 14 May 2014 08:47:48 +0000 (10:47 +0200)]
Fix tst_textinput.qml

On platforms that have QT_NO_CLIPBOARD defined copy/paste/cut functions
are not available.

Change-Id: I28be021f45cd5a5fe8aaad2752d379c3eebea8cf
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoQQuickWidget: Support drag and drop
Paul Olav Tvete [Mon, 26 May 2014 12:04:16 +0000 (14:04 +0200)]
QQuickWidget: Support drag and drop

Relay drag/drop events to the offscreen QQuickWindow.

Task-number: QTBUG-39167
Change-Id: Iaf59fb899d16ac96fc94f1df8c3a939e9bd0f92f
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
10 years agoFix type of AnimationController::animation in documentation.
Mitch Curtis [Fri, 23 May 2014 12:15:55 +0000 (14:15 +0200)]
Fix type of AnimationController::animation in documentation.

Change-Id: I3122ba1d7e9f1c396bef347cd1fd7df8ab32ff47
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoPhotoviewer: Allow using the Android back button to go back.
Niels Weber [Thu, 22 May 2014 15:02:59 +0000 (17:02 +0200)]
Photoviewer: Allow using the Android back button to go back.

Don't show back button on Android, as the system back button can
now be used.

Task-number: QTBUG-38122
Change-Id: Ia3a677f4626eaf34e23dfcc7997e4b850d8b7020
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
10 years agoV4 IR: replace QHash in DefUses with a vector.
Erik Verbruggen [Tue, 6 May 2014 08:00:58 +0000 (10:00 +0200)]
V4 IR: replace QHash in DefUses with a vector.

Change-Id: Ibf21f5fe0f8ab035add5354f45f7869f4cdfead8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix compilation on MSVC 2008
Simon Hausmann [Fri, 23 May 2014 08:05:51 +0000 (10:05 +0200)]
Fix compilation on MSVC 2008

We are using std::lower_bound on a vector where the item we search for
is of a different type than the items in the container. MSVC 2008's STL
is very happy to check all sorts of constraints and also compare the order
of items within the container. That means it tries to call the compare function
not only with the key we're searching and one item but also two items from
the container. The existing compare function can't satisfy that constraint,
so instead we'll go back to the old approach of a proper functor that
operates outside of the class scope, in order to build with older compilers.

That functor now offers all necessary overloads.

Task-number: QTBUG-38873
Change-Id: I6f350106f98cb03a4ff7e1671a84e67f629cedd3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoFix crash (failing assertion) when declaring a non-string id property
Simon Hausmann [Wed, 21 May 2014 14:11:24 +0000 (16:11 +0200)]
Fix crash (failing assertion) when declaring a non-string id property

This isn't very useful QML, but the following was "legal" in 5.1:

    property int id:
    id: foo

The integer property was not set, but the object's name (id) was still set.
With 5.3 this causes a failing assertion, which shouldn't happen. We should
do the same thing as the old code in QQmlComponent::buildProperty did for
id properties: Set them only if they're of string type.

Task-number: QTBUG-38463
Change-Id: I0da58557fbfb0944f53127e0ee77117ac33ce250
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix QQmlScriptString::isEmpty for script strings without source code
Simon Hausmann [Wed, 21 May 2014 10:19:15 +0000 (12:19 +0200)]
Fix QQmlScriptString::isEmpty for script strings without source code

The source code is not strictly required anymore and QQmlScriptString should
return true with isEmpty() if the object is conceptually empty (not usable),
not only when the source code is empty. It can still have a valid binding id
and thus be used in QQmlExpression.

Change-Id: I777717f2217d0c46e059c382761a1044881c5978
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agodeduplicate and decruft SUBDIRS list
Oswald Buddenhagen [Fri, 23 May 2014 15:54:48 +0000 (17:54 +0200)]
deduplicate and decruft SUBDIRS list

Change-Id: I56266efbe1623a529c3cf3609254abda443cf940
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix crash when sharing data structures between 32-bit and 64-bit
Simon Hausmann [Wed, 21 May 2014 08:34:29 +0000 (10:34 +0200)]
Fix crash when sharing data structures between 32-bit and 64-bit

The data structures in QV4::CompiledData are intended to be shareable
between different architectures (if endianness is the same). This requires
us to pack them, which is possible with MSVC and GCC (which also includes
clang)

Change-Id: I078254b9d314f60f8973a0c9404f53af41a48fb8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix cached compilation units for file imports
Simon Hausmann [Mon, 19 May 2014 10:22:55 +0000 (12:22 +0200)]
Fix cached compilation units for file imports

If the file doesn't exist in the file system anymore, check if it's at
least in the unit cache, as we can still load it from there. This is
used for file imports where 'import "someDirectory"' results us in trying
to locate someDirectory/<Type>.qml for any instantiation of <Type>.

Change-Id: I590161f1d2d133a49ca1b611d9a7e96d52d0bf13
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4 JIT: fix usage of d1 on ARM.
Erik Verbruggen [Mon, 19 May 2014 12:35:04 +0000 (14:35 +0200)]
V4 JIT: fix usage of d1 on ARM.

The d1 register is used by the JIT as a scratch register, so it is not
available for the register allocator. If it would be used for register
allocation, the JIT code generation might override it with something
else, thereby clobbering the result.

Change-Id: Iaf7db873d78e84c28ac9ea341f9d6da76330fe81
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 IR: removed a couple of hashes and sets.
Erik Verbruggen [Mon, 5 May 2014 14:46:46 +0000 (16:46 +0200)]
V4 IR: removed a couple of hashes and sets.

Change-Id: I09f9aa1921745b9aa323349d90c334b156f690cb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: add back HAVE_ALU_OPS_WITH_MEM_OPERAND.
Erik Verbruggen [Mon, 26 May 2014 08:28:29 +0000 (10:28 +0200)]
V4: add back HAVE_ALU_OPS_WITH_MEM_OPERAND.

This macro accidentally got dropped by
ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e.

Change-Id: I154b89df106de37c53e52c1c449bd4eabadde861
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoV4: Fix compilation failure on BB10 x86 and QNX6 x86
Sergio Ahumada [Mon, 26 May 2014 09:18:30 +0000 (11:18 +0200)]
V4: Fix compilation failure on BB10 x86 and QNX6 x86

This change amends ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e

Task-number: QTBUG-39274
Change-Id: If0c3bc1204433315b9329229304db7ddadc785f2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoV4: clean-up target specific register definitions and stack usage
Erik Verbruggen [Fri, 23 May 2014 08:23:15 +0000 (10:23 +0200)]
V4: clean-up target specific register definitions and stack usage

All constants referring to registers and all constants and functions
that do platform specific things with the stack, are all modev into a
separate file. Information about how a specific platform register is
used by the ABI is also extended and is now captured in the RegisterInfo
class. Usage of this information will be extended in subsequent patches.

This also fix ARM register usage:
- Correct fp register for Thumb mode.
- Only push registers that have to be saved and will actually be used
  from the stack (i.e. do not push r0-r3 in the function prelude).

Change-Id: Ia372505ade8f2648595c7aec1d281955392f34a1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: Split arguments/locals from temps.
Erik Verbruggen [Wed, 30 Apr 2014 13:38:01 +0000 (15:38 +0200)]
V4: Split arguments/locals from temps.

There are a couple of reasons to split the temporaries off from the
arguments and locals:

Temporaries are invisible, and changes to them cannot be observed.
On the other hand, arguments and locals are visible, and writes to them
can be seen from other places (nested functions), or by using the
arguments array. So, in practice these correspond to memory locations.
(One could argue that if neither nested functions, nor eval(), nor
arguments[] is used, the loads/stores are invisible too. But that's an
optimization, and changing locals/arguments to temporaries can be done
in a separate pass.)

Because of the "volatile" nature of arguments and locals, their usage
cannot be optimized. All optimizations (SSA construction, register
allocation, copy elimination, etc.) work on temporaries. Being able to
easily ignore all non-temporaries has the benefit that optimizations can
be faster.

Previously, Temps were not uniquely numbered: argument 1, local 1, and
temporary 1 all had the same number and were distinguishable by their
type. So, for any mapping from Temp to something else, a QHash was used.
Now that Temps only hold proper temporaries, the indexes do uniquely
identify them. Add to that the fact that after transforming to SSA form
all temporaries are renumbered starting from 0 and without any holes in
the numbering, many of those datastructures can be changed to simple
vectors. That change gives a noticeable performance improvement.

One implication of this change is that a number of functions that took
a Temp as their argument, now need to take Temp-or-ArgLocal, so Expr.
However, it turns out that there are very few places where that applies,
as many of those places also need to take constants or names. However,
explicitly separating memory loads/stores for arguments/locals from
temporaries adds the benefit that it's now easier to do a peep-hole
optimizer for those load/store operations in the future: when a load is
directly preceded by a store, it can be eliminated if the value is
still available in a temporary.

Change-Id: I4114006b076795d9ea9fe3649cdb3b9d7b7508f0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAvoid direct GL calls in Quick
Laszlo Agocs [Tue, 8 Apr 2014 13:05:21 +0000 (15:05 +0200)]
Avoid direct GL calls in Quick

Change-Id: I9b8673fb3292c9d5ad2f9e8e63f56dc661699be6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Simon Hausmann [Thu, 22 May 2014 17:59:58 +0000 (19:59 +0200)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

10 years agoRecord synchronous and asynchronous events separately in profiler test
Ulf Hermann [Thu, 22 May 2014 10:18:44 +0000 (12:18 +0200)]
Record synchronous and asynchronous events separately in profiler test

Render events as well as frame painting and keyboard and mouse
interaction happen largely independently of QML engine events. We
cannot rely on a specific composite order of both types. The tests
are written in a way that allows us to rely on a specific order
within each group, though.

Pixmap cache events are a special case and need their own category
as the load start events are synchronous while all others are
asynchronous. Still, there is a defined ordering between them.

Task-number: QTBUG-39169
Change-Id: I35220a22dcb08ea0bb7286e27347c287a5ce7983
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: fix disassembler address printing for 64bit.
Erik Verbruggen [Fri, 16 May 2014 10:06:23 +0000 (12:06 +0200)]
V4: fix disassembler address printing for 64bit.

Platforms and/or compilers have different opinions on the type of
uint64_t, so with a bit of casting and using the biggest possible
format, the warnings will hopefully disappear.

Change-Id: I1e128eaf8bc53771a517490292f52084046574dd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoBe conservative with atlas allocation for Cover windows.
Gunnar Sletta [Mon, 7 Apr 2014 10:11:45 +0000 (12:11 +0200)]
Be conservative with atlas allocation for Cover windows.

These are usually small and require a very small amount of textures.

Change-Id: I51a1d2965c37ac39c1f1f70d9bb6d7baf41e0562
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoV4 IR: change datastructure of the worklist used by type inference.
Erik Verbruggen [Thu, 10 Apr 2014 14:22:00 +0000 (16:22 +0200)]
V4 IR: change datastructure of the worklist used by type inference.

No sets, no cry, and no mallocs of QHashNodes.

QBitArray is not used on purpose: good STL implementations specialize
std::find for std::vector<bool>, with a significant speed gain.

Change-Id: Ic986bbd746e96eb494496f0508acb17318f4f0fb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSamegame: Add qsqlite as a needed QTPLUGIN
Caroline Chao [Wed, 21 May 2014 08:35:33 +0000 (10:35 +0200)]
Samegame: Add qsqlite as a needed QTPLUGIN

Required plugin are currently not detected automatically (QTBUG-35195).

Change-Id: I58e21ff2219ed5ef3042a07d19dbfa914a10f2e5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
10 years agoMark clip node dirty regardless of how its geometry was changed.
Gunnar Sletta [Wed, 21 May 2014 15:19:50 +0000 (17:19 +0200)]
Mark clip node dirty regardless of how its geometry was changed.

Task-number: QTBUG-38473
Change-Id: If6f91f1a82b89de01d254af34128b9aefebaad2d
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Simon Hausmann [Thu, 22 May 2014 05:48:30 +0000 (07:48 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I0dd91626837276f5811e4830f4a4e9f89bf1e1bd