platform/upstream/qtdeclarative.git
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 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 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 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

10 years agoRe-enable qquicktextinput test on Mac OS X
Simon Hausmann [Fri, 25 Apr 2014 11:15:52 +0000 (13:15 +0200)]
Re-enable qquicktextinput test on Mac OS X

Fixed in qtbase with commit 40b195d0f9ee7ef1b917a635bb073fa108b2ed40

Change-Id: I4af6080dde9c6356c11f09a6ded86ce9ce28b6e0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
10 years agoV4: replace debug macro by compile time constant.
Erik Verbruggen [Fri, 25 Apr 2014 13:29:22 +0000 (15:29 +0200)]
V4: replace debug macro by compile time constant.

By having all code "enabled" all the time, it will be checked by the
compiler and visible for refactoring. The compiler will optimize it away
when debugging is turned off.

Also fixes the code where previous refactoring changes were not applied.

Change-Id: I634ac85570125b533adce93ca347c4be3d60aa83
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 IR: change IR printing to use a visitor.
Erik Verbruggen [Wed, 16 Apr 2014 11:22:28 +0000 (13:22 +0200)]
V4 IR: change IR printing to use a visitor.

This allows for overriding methods to customize the printing of nodes.
It also removes some duplicate code.

Change-Id: Ieb9eec2fa7d4e211932d7772586a1d62b119a90a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoFix failing assertion inside MSVC STL in debug builds
Simon Hausmann [Tue, 29 Apr 2014 12:45:13 +0000 (14:45 +0200)]
Fix failing assertion inside MSVC STL in debug builds

When using FunctionObject's call() method, we use std::copy to copy the
arguments over to the new call context. Unfortunately std::copy has an
assertion in there to check that we're not copying out of bounds.  What the STL
doesn't know is that the Value args[1] array is dynamically allocated and
easily expands beyond just one entry.

Fall back to copying by hand to work around this issue.

Task-number: QTBUG-38195
Change-Id: I6e254b1c893ccf5cad2358179cda1b07b00228e0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix Number.toExponential with parameter
Simon Hausmann [Tue, 29 Apr 2014 15:15:55 +0000 (17:15 +0200)]
Fix Number.toExponential with parameter

The fractionDigits parameter was unfortunately ignored, due to an accidental
double variable declaration, the latter in a narrower scope shadowing the
former in the correct scope.

Task-number: QTBUG-38577
Change-Id: I28f35466d2d744e84b86a3ca6b3371eb86869b55
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDon't crash on Android
Paul Olav Tvete [Wed, 21 May 2014 12:10:02 +0000 (14:10 +0200)]
Don't crash on Android

If the platform plugin does not support the features needed
for QQuickWidget, then don't try to use it. This is a minimal
change to stop applications from crashing: it does not give
the application a way to find out if QQuickWidget is supported,
since that would mean new API, which we can't do in a patch
release.

Task-number: QTBUG-38268
Change-Id: I975a03b105b1d5c21a1d8ae440a5802ce8c1967b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix copy and paste error
Frederik Gladhorn [Wed, 14 May 2014 11:39:16 +0000 (13:39 +0200)]
Fix copy and paste error

Fix error 14 identified by static analysis from
http://www.viva64.com/en/b/0251/

Change-Id: I5f0fa6bd1f14db8e4a86c27610666df6dfd60b1c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix copy and paste error
Frederik Gladhorn [Wed, 14 May 2014 11:25:23 +0000 (13:25 +0200)]
Fix copy and paste error

Fix error 10 identified by static analysis from
http://www.viva64.com/en/b/0251/

Change-Id: I42ba9caa43c2c4925774bdc6aa7942a83cb37ba5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoIntroduce TextInput::ensureVisible(int position)
J-P Nurmi [Fri, 16 May 2014 12:35:23 +0000 (14:35 +0200)]
Introduce TextInput::ensureVisible(int position)

This is required for TextField to be able to implement text selection
handles. TextField needs to be able to ensure that the appropriate
character position becomes visible when the handles are moved around.

[ChangeLog][QtQuick][TextInput] Added TextInput::ensureVisible(int pos)
method to be able to control the scrolling position of a TextInput that
has automatic scrolling enabled.

Task-number: QTBUG-38934
Change-Id: Id77eafcda6324d10868e0798519e5b712a0d33ed
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoFocus event fix for QQuickWidget
Paul Olav Tvete [Wed, 21 May 2014 08:49:07 +0000 (10:49 +0200)]
Focus event fix for QQuickWidget

Relay focus in/out events to the offscreen QQuickWindow, and also
make the offscreen window believe it has the focus when the
render window has it.

Task-number: QTBUG-39033
Change-Id: Ib50b134e635833ad3813693ca272f04607c525b8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMake a pro file based project out of the photoviewer example
Niels Weber [Mon, 12 May 2014 11:27:24 +0000 (13:27 +0200)]
Make a pro file based project out of the photoviewer example

Having a .pro file project is necessary to be able to deploy to
Android. Further patches for Android support will be needed, but
this is the base.

Task-number: QTBUG-38122
Change-Id: I878ec1df50d7375ae9153f8a34f763b5678d7774
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
10 years agoFix tst_qquicktextinput::copyAndPaste() for asynchronous clipboard notification.
Friedemann Kleint [Wed, 21 May 2014 08:45:05 +0000 (10:45 +0200)]
Fix tst_qquicktextinput::copyAndPaste() for asynchronous clipboard notification.

Change qtbase 6a61a00ddb21e79412e82069dfef50192bfd724d for Windows uses
new clipboard notification API that results in asynchronous clipboard
notifications.

Task-number: QTBUG-39145
Task-number: QTBUG-38670
Task-number: QTBUG-33492
Change-Id: I0de78ecba5c67bf6a66f07e59312667f6ce6bf88
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoMerge remote-tracking branch 'origin/release' into stable
Iikka Eklund [Tue, 20 May 2014 10:26:14 +0000 (13:26 +0300)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I939d6b9d10b3f50d9024b80d7a215b8fd04e8d56

10 years agoFix improper antialiasing property behavior
Oleg Shparber [Mon, 19 May 2014 07:53:39 +0000 (00:53 -0700)]
Fix improper antialiasing property behavior

For components antialiased by default the property was returned
as false if default true value was set to true again.

Task-number: QTBUG-39047
Change-Id: I16960a12b6d38a0d9e487fc6612610c39c4949d4
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix tst_qquicktextedit::cursorRectangle_QTBUG_38947()
J-P Nurmi [Sat, 17 May 2014 10:42:43 +0000 (12:42 +0200)]
Fix tst_qquicktextedit::cursorRectangle_QTBUG_38947()

Fix the uninitialize variable and make sure the test creates
a window that has a sensible (200x200) size.

Change-Id: I02616ab3c832276921e84ae98b7ed926d8fc5f5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
10 years agoFix crash with running animators on re-shown windows.
Gunnar Sletta [Thu, 15 May 2014 19:01:06 +0000 (21:01 +0200)]
Fix crash with running animators on re-shown windows.

The non-threaded render loops would clean up the nodes for a window
when it was hidden, but the animators kept running and had a reference
to the deleted nodes. This was not a problem for the threaded render
loop as it would wipe the animator controller as well which would
clean the jobs.

Fix it by triggering a reset of all nodes in the animators when the
window is told to clean up. If an animator is ticked when it doesn't
have a node, it will simply do nothing. When the window is made visible
again, we call initialize on all animators to find the new node.

Task-number: QTBUG-37995
Change-Id: Ie5609d95db29f4b2b30ca5bf641dce901e528389
Reviewed-by: Michael Brasser <michael.brasser@live.com>
10 years agoTextEdit: fix cursor rectangle positioning
J-P Nurmi [Mon, 12 May 2014 16:09:08 +0000 (18:09 +0200)]
TextEdit: fix cursor rectangle positioning

QQuickTextControl::cursorRectangleChanged() wasn't emitted as
appropriate when dragging mouse => The cursor delegate was stuck
in wrong position under certain circumstances, especially when
selecting multiple lines.

Task-number: QTBUG-38947
Change-Id: Ib5b0d2f6ea2a1b3712fbaba4a7ad1865d2b0a74e
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
10 years agoAccessibility: add focus action
Frederik Gladhorn [Tue, 13 May 2014 15:45:17 +0000 (17:45 +0200)]
Accessibility: add focus action

This at least implements the focus action for items with activeFocusOnTab
which works with most controls. VoiceOver for example uses this action.

Task-number: QTBUG-38870
Change-Id: I3bdaacec6b07e9baf020499e2e4826e42fe316f0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
10 years agoDoc: Polish property binding explanations
Sze Howe Koh [Tue, 13 May 2014 23:59:18 +0000 (07:59 +0800)]
Doc: Polish property binding explanations

- Minor rearrangements
- Express things more clearly and/or concisely
- Add links

Change-Id: If1ed639609e39ed1a2c12aed3971da3ee2c8f8a0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoDoc: Describe property bindings in terms of relationships
Sze Howe Koh [Wed, 14 May 2014 14:33:34 +0000 (22:33 +0800)]
Doc: Describe property bindings in terms of relationships

- This patch aims to help readers think about bindings more
  "declaratively" by introducing a new (albeit very leaky) level of
  abstraction: Treat bindings as finitary relations, rather than mere
  JavaScript expressions.

- In essence, property bindings are for describing relationships between
  properties. The fact that the QML engine reactively updates a
  property's value when its dependencies change, and the fact that
  arbitrarily complex expressions are valid bindings, are simply
  implementation details.

- Discourage the use of side effects in property bindings. They are not
  essential for the main purpose of property bindings, they break the
  finitary relation model, and their use can reduce code
  readability/maintainability/toolability.

- Discourage complex property bindings for similar reasons.

Change-Id: I5a0a03bd02768d4c504797a0f86569f3ac066e96
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoFix typo in Image documentation.
Mitch Curtis [Thu, 15 May 2014 11:31:16 +0000 (13:31 +0200)]
Fix typo in Image documentation.

Change-Id: Ifa01f3e464c170e5f4739cea4380f1b08eeccc7e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoV4 IR: change BasicBlockSet::const_iterator to use std::find.
Erik Verbruggen [Thu, 8 May 2014 10:14:09 +0000 (12:14 +0200)]
V4 IR: change BasicBlockSet::const_iterator to use std::find.

When the storage in the BasicBlockSet is a std::vector<bool>, the
begin() iterator and the ++operator now use std::find. Good STL
implementations have an optimized version specifically for
std::vector<bool> that is a lot faster than the iterating that was used
before. The change also makes the code more readable.

Change-Id: Ic37bac694c133c597b3d61a91b04a0b758516dc3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Frederik Gladhorn [Wed, 14 May 2014 19:48:44 +0000 (21:48 +0200)]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

10 years agoSupport smooth for AnimatedSprite
Gunnar Sletta [Mon, 12 May 2014 08:38:58 +0000 (10:38 +0200)]
Support smooth for AnimatedSprite

Task-number: QTBUG-38923
Change-Id: I1cb9ac434aa729ee390e17deced9ed470895549d
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
10 years agoDon't adjust the position of transitioning list items.
Jan Arve Saether [Fri, 2 May 2014 13:46:12 +0000 (15:46 +0200)]
Don't adjust the position of transitioning list items.

Adjusting the position of list items only makes sense for items that
belongs to the layout.

Task-number: QTBUG-38229
Change-Id: I7a05f7a3591620cce3cd9ab84cfecbe325e5e93c
Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
10 years agoIntroduce MouseArea.drag.smoothed
Kevin Funk [Wed, 7 May 2014 17:01:19 +0000 (19:01 +0200)]
Introduce MouseArea.drag.smoothed

[ChangeLog][QtQuick] Added property MouseArea.drag.smoothed for toggling
whether the drag target is moved to the current mouse position after a
drag operation has started.

Task-number: QTBUG-38539
Change-Id: I989b51bc83fc24c64b84ac8e9a50b352e674e8f8
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix regression in QJSValueIterator::next() since Qt 5.1.1
Gunnar Sletta [Wed, 14 May 2014 07:30:37 +0000 (09:30 +0200)]
Fix regression in QJSValueIterator::next() since Qt 5.1.1

Iteration on the form "while (next) { .. }" would skip
the last element.

Change-Id: I50692a5a75e23e423e82b7a39e1892f505e4c612
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Tue, 13 May 2014 20:12:48 +0000 (22:12 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I24827851643247b938b3a1b7182864293e5c3fe7

10 years agoDoc: add docs for Photo Surface demo
Leena Miettinen [Wed, 7 May 2014 13:44:17 +0000 (15:44 +0200)]
Doc: add docs for Photo Surface demo

Change-Id: Id6f40b1b769fdd103cfb2afda172b1daf9b1a105
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoMinor: Remove unneeded include from qquickitem.h
Kevin Funk [Sat, 10 May 2014 10:12:18 +0000 (12:12 +0200)]
Minor: Remove unneeded include from qquickitem.h

Clean up after 0cb12e9e01b8309320706fab219945f0ff159413

Change-Id: I7e7f0c1f7e3b9bb994bc8fd50e1c9ba462e99e28
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoImplement proper support for layoutChange in QQmlDelegateModel
Daniel Vrátil [Wed, 16 Apr 2014 16:33:24 +0000 (18:33 +0200)]
Implement proper support for layoutChange in QQmlDelegateModel

Current implementation is treating model layoutChange the same way as modelReset,
which causes problems when using ListView on top of a QSortFilterProxyModel. The
model emits layoutChanged whenever a data within sorting column change. Treating
it as modelReset leads to poor performance on large models and caused UI issues,
because the scrolling position is reset every time.

This patch implements proper handling for layoutChanged signals by first handling
all items moves and then simulating dataChange for all items.

This fixes regression from Qt 5.1 introduced by Change I16b859d9

Task-number: QTBUG-37983
Task-number: QTBUG-34391
Change-Id: I6d3873b7b87e7f0e8fc0c1ed5dc80c6f8fdf6c22
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Michael Zanetti <michael.zanetti@canonical.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDoc: Fix invalid cross-reference
Kevin Funk [Sun, 11 May 2014 16:55:39 +0000 (18:55 +0200)]
Doc: Fix invalid cross-reference

Change-Id: Ib344215f240705100da8d949ac86b57af26a97ef
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
10 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Fri, 9 May 2014 14:25:58 +0000 (16:25 +0200)]
Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
.qmake.conf
src/plugins/accessible/quick/quick.pro
src/quick/items/qquickpincharea.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
src/quick/scenegraph/qsgthreadedrenderloop.cpp

Manually adjusted for TestHTTPServer constructor change:
    tests/auto/quick/qquickimage/tst_qquickimage.cpp

Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f

10 years agoFix QJSEngine::evaluate using the wrong execution context
Simon Hausmann [Mon, 5 May 2014 13:45:54 +0000 (15:45 +0200)]
Fix QJSEngine::evaluate using the wrong execution context

In contrary to what the documentation says, QJSEngine in Qt 5.x executes
in the context of the global object (QScriptIsolate always called enter
on the QV8Engine's "root" context, thus making it current). The v4
implementation unfortunately did what the documentation said and used
the current context, which is wrong in many ways. For example it completely
breaks the optimization of stack allocated contexts, because when a C++
callback is called from within a JS function with a stack allocated context
and that C++ code calls QJSEngine::evaluate and creates new closures, the
stack context would become an outter context and cause crashes during GC.

This patch restores the behavior of Qt 5.0/5.1 and fixes the documentation.

Task-number: QTBUG-38530
Change-Id: Ie6481f02e676954cc94b188a1c87c88e7c56dafa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix crash on host/target word size mismatches
Simon Hausmann [Wed, 7 May 2014 11:51:26 +0000 (13:51 +0200)]
Fix crash on host/target word size mismatches

When compiling on a 64-bit host and using the QV4::CompileData on a 32-bit
target, the size of QArrayData is different. Therefore we cannot use it in
the QV4::CompiledData and have to resort to storing only the characters in
there. We can at least still use fromRawData when extracting strings, but the
QStringData will have to be allocated now.

Change-Id: Ia9dab1722ed72186451b65ba74457051c6ce3155
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix some typos in usage string.
Jeff Tranter [Thu, 8 May 2014 20:37:14 +0000 (16:37 -0400)]
Fix some typos in usage string.

Fix some spelling errors in the command usage string.

Change-Id: Iee94987d0a3dff78e39f588b4c21415ed40a514c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoFix tst_textedit.qml
Bernd Weimer [Tue, 29 Apr 2014 06:51:58 +0000 (08:51 +0200)]
Fix tst_textedit.qml

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

Change-Id: Ia2c82d0d3910f89642b1c3ef719caee88da3999e
Reviewed-by: Damian Jansen <damian.jansen@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
10 years agoRemove V8 profiler service
Ulf Hermann [Wed, 7 May 2014 09:21:40 +0000 (11:21 +0200)]
Remove V8 profiler service

It's broken and useless and it sends confusing data to the profiler
client.

Task-number: QTCREATORBUG-12188
Change-Id: I944cf19a78ee4378d5773e7aa80876f199a0f03b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoV4 IR: remove unused fields from BasicBlock
Erik Verbruggen [Thu, 8 May 2014 08:52:00 +0000 (10:52 +0200)]
V4 IR: remove unused fields from BasicBlock

Also reserve maximum used size for the in/out edge vectors.

Change-Id: I227a2aa0a5211a6425da3aa7318daa120eadfd6c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoRe-fix the warning from cached-powers.cc
Thiago Macieira [Thu, 8 May 2014 06:58:01 +0000 (23:58 -0700)]
Re-fix the warning from cached-powers.cc

This file is now getting included in a different module. See also
e02cb2b31ab0b171f11d278305d9f532f005bc80,
60aed669345be33b916c44556555b922aa3ed928, and
66e72c2cf08c2d2c381c6c22e4760d0df758af52.

Change-Id: Ic886bdf823d5dd6d9ae3df64608d8bb9d901661f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAndroid: Add support for new input method query API
Paul Olav Tvete [Wed, 7 May 2014 13:02:29 +0000 (15:02 +0200)]
Android: Add support for new input method query API

Change 93fd268d implemented the new API, but missed the final
piece that actually made use of it.

Task-number: QTBUG-38824
Change-Id: Iea28f2cbb8c6d749d781dcf7437552597977f9ac
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoMake item.layer and item.layer.effect work inside positioners.
Gunnar Sletta [Sat, 3 May 2014 08:06:09 +0000 (10:06 +0200)]
Make item.layer and item.layer.effect work inside positioners.

Task-number: QTBUG-31269
Change-Id: Ic3bb76ea5a5055df614f2eaacd3031445f118ca7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoDocument that MouseArea::enabled is not the same thing as Item::enabled.
Robin Burchell [Wed, 7 May 2014 15:49:30 +0000 (17:49 +0200)]
Document that MouseArea::enabled is not the same thing as Item::enabled.

This might change in the (long) future, but not yet.

Task-number: QTBUG-38364
Change-Id: Ia424d6b5d54dff88f67b39e4521b5ecc3121fd07
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoItem views: prevent negative cache buffer
J-P Nurmi [Tue, 6 May 2014 10:22:32 +0000 (12:22 +0200)]
Item views: prevent negative cache buffer

A negative cache buffer does not make much sense, and the item views
would go crazy and start creating/destructing delegates endlessly.

Task-number: QTBUG-38725
Change-Id: I1fbba1f3130a99af67fbc4c2aba4d3199d0554a9
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoUse correct matrix for render nodes.
Gunnar Sletta [Tue, 6 May 2014 12:54:52 +0000 (14:54 +0200)]
Use correct matrix for render nodes.

Change-Id: I8c137383fa32a64ba64ffb4ed48aa123d0ebf000
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agonest quickwidgets into the opengl conditional
Oswald Buddenhagen [Wed, 9 Apr 2014 12:23:28 +0000 (14:23 +0200)]
nest quickwidgets into the opengl conditional

the qtHaveModule(quick) could have of course not worked at this point.

Task-number: QTBUG-38202
Change-Id: Id0270d445b9b82731209d69a9dc1950c03c26781
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>