platform/upstream/qtdeclarative.git
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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>
10 years agoFix typo in QQuickText documentation.
Mitch Curtis [Tue, 6 May 2014 12:04:27 +0000 (14:04 +0200)]
Fix typo in QQuickText documentation.

Change-Id: Ic2e96e881fe13bcac11e7c172963e2c1e9928256
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoQWindowsFontEnginge uses GetGlyphOutline which seems to fail
Jørgen Lind [Wed, 30 Apr 2014 08:44:55 +0000 (10:44 +0200)]
QWindowsFontEnginge uses GetGlyphOutline which seems to fail

for fonts containing embedded bitmaps.

Change-Id: I035df24d16f1c9707fff54b0920c8139fda3ddec
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoDoc: add docs for Calqlatr example
Leena Miettinen [Fri, 2 May 2014 15:07:58 +0000 (17:07 +0200)]
Doc: add docs for Calqlatr example

Describe the QML and Qt Quick features that the
example illustrates.

Change-Id: I9a3656873ac1a5a8cdf31b1f85528b1bf081df79
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoRemove references of QML as a 'declarative' language
Kai Koehne [Tue, 29 Apr 2014 08:10:03 +0000 (10:10 +0200)]
Remove references of QML as a 'declarative' language

Though the core of QML is declarative, it incorporates JavaScript, a
multi-paradigm language on its own. It's therefore correct to call it
a multi-paradigm language, too.

Change-Id: Ia72acedafefb68ea8c49b9f6ab195ca9e73dad5f
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoQQmlPlatform: use QStringLiteral instead of QLatin1String
J-P Nurmi [Tue, 6 May 2014 11:37:40 +0000 (13:37 +0200)]
QQmlPlatform: use QStringLiteral instead of QLatin1String

Change-Id: I83fb44c0bb7d57bc68c6ac54379d5bb0c7ec9715
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agoBe more verbose about actual results in tst_qqmlprofilerservice
Ulf Hermann [Tue, 6 May 2014 10:09:07 +0000 (12:09 +0200)]
Be more verbose about actual results in tst_qqmlprofilerservice

QCOMPARE and QVERIFY2 are clearly superior to QVERIFY when comparing
values in tests.

Change-Id: Ia860d6f087680066fbe0ffa311b5557e77f1720c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoReturn "winphone" and "winrt" for Qt.platform.os when appropriate
Andrew Knight [Mon, 5 May 2014 17:18:56 +0000 (20:18 +0300)]
Return "winphone" and "winrt" for Qt.platform.os when appropriate

Task-number: QTBUG-38532
Change-Id: I33b4fe5bb61baf9df3ca472424ca631172bf70fb
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
10 years agoUpdate qmltypes files
Alan Alpert [Thu, 1 May 2014 21:08:42 +0000 (14:08 -0700)]
Update qmltypes files

Additionally, fixes some revisioning errors which a manual inspection
of the qmltypes files diffs revealed.

-mipmapChanged signal is new
-windowTitleChanged signal is new
-Matrix4x4 made 5.3, but was revisioned for 5.4

Task-number: QTBUG-29806
Change-Id: I4cb8bca6ac6fe8040871734c88aabcd392c1d696
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
10 years agoAndroid: Fix crash in String.replace() in release builds
Eskil Abrahamsen Blomfeldt [Mon, 5 May 2014 13:01:10 +0000 (15:01 +0200)]
Android: Fix crash in String.replace() in release builds

When enabling optimizations in the compiler, it produces bogus
code for the regExp->value deref in the line

nMatchOffsets += regExp->value->captureCount() * 2

This is a random refactoring to work around the compiler bug.
The only line that actually needs to be touched is the one mentioned
above, but I replaced all uses of regExp->value so that it
wouldn't look too weird.

Task-number: QTBUG-38692
Change-Id: Ib33a523a86ce51ebc6c7095a803fedaebcaa8e63
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoqmlplugindump: Fix platform plugin specification.
Friedemann Kleint [Mon, 5 May 2014 10:40:03 +0000 (12:40 +0200)]
qmlplugindump: Fix platform plugin specification.

Fix warning:
Project WARNING: CONFIG+=qpa_minimal_plugin is deprecated. Use QTPLUGIN.platforms=qminimal instead.

Change-Id: I81f92f86bd699854253b4e3fb7d0ae6eeab4aafc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
10 years agofix copying of qmldir file to build dir
Oswald Buddenhagen [Fri, 2 May 2014 16:49:31 +0000 (18:49 +0200)]
fix copying of qmldir file to build dir

Task-number: QTBUG-36252
Change-Id: Icbd956daf707105a5616d057c11b9aa1f55ff5d2
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoQQuickRenderControl: Fix compilation with MSVC compiler
Louai Al-Khanji [Mon, 5 May 2014 06:22:02 +0000 (09:22 +0300)]
QQuickRenderControl: Fix compilation with MSVC compiler

MSVC fails to parse the pointer correctly, thinking that the */* pattern
attempts to close a comment.

Change-Id: Iac26d7fe9cb6f8aaa855d86ef8d6c2b9f85d6840
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoInvalidate text painting nodes when document text block is updated
Sarunas Valaskevicius [Sun, 9 Feb 2014 18:50:42 +0000 (18:50 +0000)]
Invalidate text painting nodes when document text block is updated

The commit fixes text repainting when only formatting of the text is
changed by invalidating the affected blocks which will be repainted
on the next update.

Task-number: QTBUG-36743
Change-Id: I03ba747f9d08a9f49d0a012b8349c89c20dc6b55
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoStocQt demo improvement
Mika Salmela [Fri, 2 May 2014 11:14:55 +0000 (14:14 +0300)]
StocQt demo improvement

Along with general demo improvements, this task implements the new layout
to the StocQt demo. Also few bugs on the functionality are corrected, like
drawing the stock graph on right way and initial values reset on stock
model when changing active stock.

Task-number: QTBUG-38254
Change-Id: I9d3387ed0e3f23512b8e60c70246589c10237818
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoAlways implement text input "canPaste" property
Bernd Weimer [Mon, 14 Apr 2014 07:50:41 +0000 (09:50 +0200)]
Always implement text input "canPaste" property

This is needed for TextField control for instance.
If QT_NO_CLIPBOARD is defined, canPaste will always return false.
Fixes dialogs auto test when QT_NO_CLIPBOARD is defined.

[ChangeLog][QtQuick][Platform Specific Changes] Added canPaste
property to TextInput element also on platforms that don't support
a clipboard (QT_NO_CLIPBOARD is defined).

Change-Id: Ia85205672ba59c1fce70852458c514b03d332de6
(cherry picked from commit c2d802049e48d1d6f0bce6eb0972fb26dc4d6ce3)
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
10 years agoAdd [ChangeLog] tags to qtdeclarative changelog.
Alan Alpert [Thu, 24 Apr 2014 04:04:52 +0000 (21:04 -0700)]
Add [ChangeLog] tags to qtdeclarative changelog.

Change-Id: Ia235b6b2397cfaeb20f0c7ea0d6196c603b2aaaa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
10 years agoMerge remote-tracking branch 'origin/release' into stable
Frederik Gladhorn [Thu, 1 May 2014 10:44:51 +0000 (12:44 +0200)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I996a85744753598bb48c7e0d7954049202f4f037