konrad/qtdeclarative.git
11 years agodon't use CamelCase includes
Oswald Buddenhagen [Tue, 12 Mar 2013 19:26:13 +0000]
don't use CamelCase includes

they are not available during bootstrap.

Change-Id: I5e941f22cd2b9fa622730ba0bf8389394f6a30a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>

11 years agoAdd QtQml.Models module
Alan Alpert [Wed, 23 Jan 2013 22:08:58 +0000]
Add QtQml.Models module

The moved Model classes can now be exposed in a QtQml import.

To keep the QtQml import resticted to more core functionality, they are
being exposed in a plugin module.

Change-Id: I0a84642a72c7c9bbf9b6ffd2a6c33549f8e61c29
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>

11 years agoFix remote image loading for AnimatedSprite
Alan Alpert [Tue, 26 Feb 2013 21:50:51 +0000]
Fix remote image loading for AnimatedSprite

The Sprite generated behind the scenes had no QmlEngine associated, and
the engine is needed by QQuickPixmap for async loading.

Task-number: QTBUG-28086
Change-Id: Ibf3b03c54b339fe8f44201dc6fcb507e5274bbec
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoFixed some auto tests
Bernd Weimer [Thu, 7 Mar 2013 15:07:35 +0000]
Fixed some auto tests

In the listmodel test an error description was not converted to a
string.
In the pathview test, number literals are always interpreted as double,
but qreal can also be float, which lead to failing tests. Constructor
usage prevents "expected data of type 'float', got 'double'".

Change-Id: I0c760486de0ba4df6a5e9a33e9528ca7d7a1a63e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>

11 years agoFix QString usage in createPixmapDataSync().
Friedemann Kleint [Thu, 7 Mar 2013 14:47:27 +0000]
Fix QString usage in createPixmapDataSync().

Warning introduced by  707bbe5dea9d7398b205124a54422f2fafb6f151 .

Change-Id: I20f0da00ea519cc2ec82a1d13f1887c099a3947c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>

11 years agoDisable accessibility temporarily.
Frederik Gladhorn [Tue, 12 Mar 2013 12:38:11 +0000]
Disable accessibility temporarily.

This is required to update headers in QtBase.

Change-Id: I373a1f13dcde8ce1cafeedb5cd2269a0f8f3a670
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>

11 years agoFixed incorrect vsync delta time in QSGThreadedRenderLoop.
Yoann Lopes [Fri, 8 Mar 2013 13:28:21 +0000]
Fixed incorrect vsync delta time in QSGThreadedRenderLoop.

Change-Id: I32bb720e9c9aa0278959dd64e5e1c449bdace7d1
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoIntroduce QML_FBO_FLUSH_BEFORE_DETACH to work around FBO issue.
Michael Brasser [Tue, 5 Mar 2013 02:20:15 +0000]
Introduce QML_FBO_FLUSH_BEFORE_DETACH to work around FBO issue.

On some AMD hardware, detaching the depth attachment immediately after
rendering to an FBO will cause rendering issues. Adding an explicit
glFlush before detaching seems to work around the issue.

Task-number: QTBUG-29265
Change-Id: I97c7b87c1c3d3a69a4d6228dd9459745710c5f4c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoUse official V8 string manipulation methods in QML
Peter Varga [Fri, 1 Mar 2013 13:39:59 +0000]
Use official V8 string manipulation methods in QML

The QtJSBackend's String::GetCharacter and String::Equals methods are Qt
specific and they are not supported by official V8. These methods can be
replaced by more "V8-friendly" implementations in QtDeclarative. Thus
the mentioned methods can be removed from QtJSBackend to reduce the
difference between QtJSBackend and the official V8 source.

Change-Id: I5590ca62dc667e64a7f54a7e47a02d350ba0c077
Reviewed-by: Lars Knoll <lars.knoll@digia.com>

11 years agocorrect misspelling
Shawn Rutledge [Mon, 11 Mar 2013 10:05:44 +0000]
correct misspelling

Canceled

Change-Id: Ie080e5be4af0cf60cab56e906f82fb6e7b32c6e3
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoCreate the sg render thread's opengl context on the GUI thread
Gunnar Sletta [Fri, 8 Mar 2013 18:45:07 +0000]
Create the sg render thread's opengl context on the GUI thread

Change-Id: I710d80ebb4e5a12fda1f58f54089b0e72268dfcf
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoSupport activeFocusOnTab in QQuickItem
Liang Qi [Fri, 22 Feb 2013 12:44:06 +0000]
Support activeFocusOnTab in QQuickItem

Add activeFocusOnTab as property to QQuickItem. Setting the
property allows automatic keyboard navigation between all
elements that have it set.

This key event handler will only be called after the QML key
handlers, such as KeyNavigation and Keys, and the C++ key
event handlers, such as keyPressEvent function.

Algorithm is most done by Frederik Gladhorn, in cooperation with
Gabriel de Dietrich.

Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com>
Done-with: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Change-Id: I8b58be9c20d113661fe85d27bdb1af84340d9de5
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoFix displacement transition bug for horizontal case
Guenter Schwann [Wed, 27 Feb 2013 14:52:03 +0000]
Fix displacement transition bug for horizontal case

Task-number: QTBUG-29944

Change-Id: I23381f7a1d2c8d3c6df007b5b11c12b0db3bb1e9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoReplace deprecated V8 functions
Peter Varga [Mon, 4 Mar 2013 16:21:08 +0000]
Replace deprecated V8 functions

The External::Wrap and External::Unwrap functions became deprecated in
the mainline V8. Replace them as it is officially proposed.

Change-Id: Ieac1da53997da440a909939d86c98f17a124c068
Reviewed-by: Lars Knoll <lars.knoll@digia.com>

11 years agoRemove comment about performance in qquickitem's clip property.
Gunnar Sletta [Thu, 7 Mar 2013 07:23:07 +0000]
Remove comment about performance in qquickitem's clip property.

Change-Id: I2d1b9a86251466445d506969d779308e2d7b92bb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoMark geometry dirty to signal scene graph that a repaint is needed.
Gunnar Sletta [Thu, 28 Feb 2013 11:28:16 +0000]
Mark geometry dirty to signal scene graph that a repaint is needed.

Change-Id: Ic230ffe43b690e3f1e0e7290c4c9571f60bd34b7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoFix MSVC warning C4819 under Chinese locale
Debao Zhang [Wed, 6 Mar 2013 08:57:44 +0000]
Fix MSVC warning C4819 under Chinese locale

warning C4819: The file contains a character that cannot be represented in
the current code page (936)

Change-Id: I53dc345e03b0ec6f951bd2763bc1bab4aef63d04
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>

11 years agoFix warnings about overloaded virtual functions in tests (CLANG).
Friedemann Kleint [Thu, 7 Mar 2013 11:08:48 +0000]
Fix warnings about overloaded virtual functions in tests (CLANG).

Change-Id: I1f4bda77d0520766813201726f53b439b6094a24
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>

11 years agoTests: add autotests for TextEdit and TextInput
Caroline Chao [Tue, 5 Mar 2013 13:56:10 +0000]
Tests: add autotests for TextEdit and TextInput

Check the selection is not cleared when the control receives
a focus out event with one of the following reason:
- Qt::ActiveWindowFocusReason
- Qt::PopupFocusReason

Change-Id: I38f4a4cba5e769f19de4e327d03be57a8d1d36a7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoHandle focus events directly in TextEdit.
Frederik Gladhorn [Mon, 4 Mar 2013 20:26:13 +0000]
Handle focus events directly in TextEdit.

Instead of relying on the item change
where we don't get focus reason, use
focusInEvent and focusOutEvent.

Change-Id: I2db7d81c67c65595b929fdcedc568af360831c5c
Reviewed-by: Caroline Chao <caroline.chao@digia.com>

11 years agoTextInput: Update text deselection on focus out event
Caroline Chao [Tue, 5 Mar 2013 10:11:02 +0000]
TextInput: Update text deselection on focus out event

The text selection should not be cleared when the focus
out event received has one the following reasons:
- Qt::ActiveWindowFocusReason
- Qt::PopupFocusReason

When the user opens a menu or navigates to another window,
the eventual selection should not be clearer.

This also makes the behavior consistent with TextEdit.

Change-Id: Ibc6242cb2f8207cf5281925c8e20b88394f21eea
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoTextInput: Handle focus event directly
Caroline Chao [Tue, 5 Mar 2013 10:04:26 +0000]
TextInput: Handle focus event directly

Use focusInEvent and focusOutEvent instead of changeItem
to handle focus event. (One benefit is the focus events
have the focus reason and changeItem doesn't).

Change-Id: I164820f375f0ffddc529d59565a3e448b84c6042
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoFocus reason
Caroline Chao [Tue, 5 Mar 2013 11:00:19 +0000]
Focus reason

When trying to do for example text handling it becomes
obvious that focus handling is not proper.

A mouse click focus should de-select text,
while a window change should preserve the selection.

Re-introduce focus reason.

Change-Id: I3322c976437cba68938d7c9188e549bdb499fa5a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoFix rendering of subpixel positioned native text
Eskil Abrahamsen Blomfeldt [Tue, 5 Mar 2013 13:21:04 +0000]
Fix rendering of subpixel positioned native text

To get accurate sampling of the native text rendering, we use
nearest filtering. This, however, does not work well when we're
sampling in the middle of pixels and the result is that with
text which is positioned at 0.5 offsets, we will sample the
wrong pixels and get artifacts from this. The main use case
for native rendered text is unrotated and unscaled text,
so we fix this use case by pixel-aligning the translation
factor.

Done-with: Samuel

Task-number: QTBUG-30022
Change-Id: I6911196d6ff491dca3b329c42da1c6dd7263cff0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoDisable qv8profilerservice test. It is very unstable
Gunnar Sletta [Wed, 6 Mar 2013 10:12:44 +0000]
Disable qv8profilerservice test. It is very unstable

Change-Id: Ic7fada8ca457b15fb62a47d2137de7d6f8b1711a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>

11 years agoDisable more unstable tests
Gunnar Sletta [Thu, 7 Mar 2013 07:49:36 +0000]
Disable more unstable tests

Change-Id: I54db72466ca50d65dd39e9c8e25d3a366cb737ea
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>

11 years agoRemove spurious include
Alan Alpert [Mon, 25 Feb 2013 22:38:07 +0000]
Remove spurious include

While it's discouraged to use the entire module headers inside Qt, this
particular example also compiles without the line.

Change-Id: I75b6fc09e11d00df2f19f5db9b0209ed4cd82844
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>

11 years agoAdd core application functionality to Qt.application in QML
Alan Alpert [Tue, 19 Feb 2013 05:07:15 +0000]
Add core application functionality to Qt.application in QML

This exposes some information to QML which is available on
the QCoreApplication instance.

A future change should make it possible to restrict this for use in scripting
environments (which should not have access to the QCoreApplication). That has
been left out of this change because proper support for such restrictions is
not yet in place.

Change-Id: Ica144fcfb0b42fa6df8d0cb1c7c03eb97282b489
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>

11 years agoAndroid support: build fixes
Paul Olav Tvete [Mon, 4 Mar 2013 12:51:32 +0000]
Android support: build fixes

Change-Id: If829341b0baef7b253a386a195d3b5e4238b8103
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>

11 years agoAccessibility: Adapt memory management for Qt 5.1
Frederik Gladhorn [Wed, 9 Jan 2013 14:51:04 +0000]
Accessibility: Adapt memory management for Qt 5.1

The model was changed to cache interfaces, so
do not try to delete them.

Change-Id: I5a97a6aca38036803c62d90988bb6d02196f0b84
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>

11 years agoFix crash for keypress without active focus.
Frederik Gladhorn [Mon, 4 Mar 2013 23:23:23 +0000]
Fix crash for keypress without active focus.

If there was no active focus item
we need to use tryShortcutEvent with
 the window as target.

Change-Id: I420925781bbbda79fe2a62a5774230ae77c2cd34
Reviewed-by: Liang Qi <liang.qi@digia.com>

11 years agoRemove extra semicolon.
Frederik Gladhorn [Mon, 4 Mar 2013 20:08:12 +0000]
Remove extra semicolon.

Change-Id: I5830f8dd2c636ad8653506c04f8ea1a9ac000f9a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>

11 years agoLoad "@2x" images on high-dpi "retina" systems.
Morten Johan Sørvig [Tue, 5 Mar 2013 07:55:34 +0000]
Load "@2x" images on high-dpi "retina" systems.

Check for the existence of a "@2x" file when loading
an image from a local file url. For example,

Image {
source = "foo.png"
}

will load "foo@2x.png" if that file exists.

Change-Id: I37688d035bc9eb412d54be0eb758dd52ebfa5d90
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoWork with synchronous replies from a custom QNetworkAccessManager
Alan Alpert [Thu, 28 Feb 2013 17:13:23 +0000]
Work with synchronous replies from a custom QNetworkAccessManager

Forward port of e5783b79887299d094 from QtQuick 1.

Task-number: QTBUG-27723
Change-Id: I4332dd72bb9d65167307c1ac5ce24e93b14cff5f
Reviewed-by: Peter Hartmann <phartmann@rim.com>

11 years agoFix relative URL in parallax example
Alan Alpert [Thu, 28 Feb 2013 18:24:47 +0000]
Fix relative URL in parallax example

Samegame demo moved a while back, this didn't get updated.

Change-Id: Ib34a09f606528e1e53650bbbd4d19787b1864bcb
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoAdded photosurface example to demo PinchArea/MouseArea together
Shawn Rutledge [Mon, 25 Jun 2012 18:06:12 +0000]
Added photosurface example to demo PinchArea/MouseArea together

It seems to be important to put the MouseArea inside the PinchArea
in order to support simultaneous drag/rotate/pinch.

Change-Id: Ic3ec6a131bd2d4c7f8a8560cd9c3015a717fef20
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoAutotests w CONFIG+=parallel_test don't depend on activation or focus
Shawn Rutledge [Mon, 4 Mar 2013 13:01:02 +0000]
Autotests w CONFIG+=parallel_test don't depend on activation or focus

If the test does requestActivate() or relies on isFocusWindow(),
the test cannot be parallel_test.  Also, a lot of the tests don't
actually need the window to be active, only exposed; and waiting
only for exposed is likely to make them more stable.

Change-Id: I0845b9b12ddf7f0c8906d9738a3e26d46ab98820
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoPinchArea autotest doesn't depend on window activation; QScopedPointer
Shawn Rutledge [Mon, 4 Mar 2013 12:58:57 +0000]
PinchArea autotest doesn't depend on window activation; QScopedPointer

The QQuickView pointer is guarded by a QScopedPointer to make sure it
will be deleted if the test fails.  And because we don't depend on
window activation, the test should be parallelizable.

Change-Id: I33a5dcff037087d9752b264eb067196c2a5be535
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agopressedCanceledOnWindowDeactivate pops up a second window
Shawn Rutledge [Mon, 4 Mar 2013 11:52:11 +0000]
pressedCanceledOnWindowDeactivate pops up a second window

in order to cause the first one to be deactivated.

Task-number: QTBUG-29953
Change-Id: I7fec66b07976b2afc78941d39c593f99ea484522
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Frederik Gladhorn [Mon, 4 Mar 2013 17:17:10 +0000]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

11 years agoEnablers for input methods on Android
Paul Olav Tvete [Wed, 27 Feb 2013 11:53:23 +0000]
Enablers for input methods on Android

Change-Id: Ic26722cf530e7a787e7a8f92b645e3c4883d9822
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>

11 years agoadding QtQuick.Dialogs, with FileDialog implementation
Shawn Rutledge [Tue, 8 Jan 2013 16:30:49 +0000]
adding QtQuick.Dialogs, with FileDialog implementation

This will obsolete the QFileDialogItem in desktop components and be
available to all QtQuick applications.  The QML FileDialog type is
dynamically defined in the plugin by detecting which implementation
will work on the current platform.

Change-Id: I073c7a84bff6c02cf592dc46822a5a4b9c9bcaea
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoDo not print out leaked pixmaps by default
Gunnar Sletta [Tue, 26 Feb 2013 15:56:22 +0000]
Do not print out leaked pixmaps by default

Change-Id: Id112def9710efa943ffc5350a25d40d4c4f463a1
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoAdded examples on how to use FBOs with scene graph.
Gunnar Sletta [Wed, 27 Feb 2013 07:44:47 +0000]
Added examples on how to use FBOs with scene graph.

I also cleaned up the naming of the other scene graph examples a bit,
so that they sort together in the samples list and have a more obvious
naming scheme.

Task-number: QTBUG-29548
Change-Id: I455eacb02c06058a6d49e12e4f1813ec80b655f6
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoFix docs for Canvas.renderStrategy, the default is Cooperative
Gunnar Sletta [Tue, 26 Feb 2013 13:56:43 +0000]
Fix docs for Canvas.renderStrategy, the default is Cooperative

Task-number: QTBUG-29833
Change-Id: I3ee680d2decb01ff514852b2445617e6ab1b1480
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoFix the QtQml's use of plugins for value type providers
Thiago Macieira [Thu, 28 Feb 2013 20:41:03 +0000]
Fix the QtQml's use of plugins for value type providers

When the QtQuick library is loaded, it runs a global constructor that
installs the QtQuick value providers. But those providers are never
uninstalled when the library is unloaded, resulting in a dangling
pointer stored in QtQml's singly-linked list of value providers.

Since cafb02911a29b98ac2652fde64e95870e70fd547, QLibrary will unload
plugins after inspecting their plugin metadata on Mac and Windows. If
QtQml is trying to load a plugin that links to QtQuick (in particular,
*the* qtquick2plugin plugin), it would cause the value provider to go
stale.

To make matters worse, it's quite likely that the plugin would get
loaded soon after, at the same address in memory, which causes the
valueTypeProvider list to become cyclic.

Change-Id: I6f4db5475ceeaba766d9e9c78f86266c9a65806a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoskip failing constantUpdatesOnWindow test for now
Shawn Rutledge [Fri, 1 Mar 2013 14:49:09 +0000]
skip failing constantUpdatesOnWindow test for now

This test tries to render some frames and count them; but even 10
frames in one second seems to be too many to expect on the CI Macs.

Change-Id: Id9cd700499101ca10afeddee89bc183fef7d30d3
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoAllow shortcut overrides.
Frederik Gladhorn [Tue, 26 Feb 2013 14:20:46 +0000]
Allow shortcut overrides.

When delivering shortcut events, make it possible
for the current active focus item to override the focus.

The use case is having an edit/copy menu (ctrl+c) and
a text edit. When the text edit is focused, it should
override the global shortcut.

Change-Id: Ide5b94832289c32762ef7304cdc94c107301d579
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>

11 years agoAvoid ambiguous include guards in SG classes
Gunnar Sletta [Mon, 25 Feb 2013 16:22:58 +0000]
Avoid ambiguous include guards in SG classes

These include guards stem from the olden days before the QSG
prefix and many of them are conflict prone, which can lead
to pretty bisarrer errors for the user.

Change-Id: I0e76c68a588404b6e82be9ecc2e7afa3b9a48e78
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoChange Canvas to use Image and antialiasing by default.
Gunnar Sletta [Tue, 26 Feb 2013 12:35:46 +0000]
Change Canvas to use Image and antialiasing by default.

Change-Id: I3033cba7c2f9e1dd9886e8f92ece1a2f43f60c01
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoVarious improvements to Canvas examples
Jens Bache-Wiig [Sun, 24 Feb 2013 14:47:38 +0000]
Various improvements to Canvas examples

I noticed these examples were rather "aestetically
challenged" and decided to make it a test case for our
WIP style guidelines.

- Use consistent margins (12 px)
- Use proposed color palettes
- Use proposed fonts and header styles

I created a new Slider graphic and moved this into
the shared folder as I think it is useful for other examples.

I removed a lot of unused files which seem to have been added
but never actually used.

I also found several bugs in our implementation, including
not scaling or rotation around the correct origin.

In many cases I simplified the examples, removing
variables/sliders where they did not add significantly
to the example itself.

Change-Id: Ie09da33deaf56a3ec45a2031b87a24a8602e994a
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Mon, 25 Feb 2013 10:57:50 +0000]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ia02971527a2d1a80c5624d69330428818aab3a41

11 years agoImproved documentation in the Screen attached property
Shawn Rutledge [Wed, 20 Feb 2013 14:24:50 +0000]
Improved documentation in the Screen attached property

It can attach to the Window now too, so needs some clarification
about when to use it that way.  The orientation properties also need
more description to avoid confusion.

Change-Id: Ib537422f6001d8b64de176e60a6433b2e25551b9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>

11 years agoFix warnings about shadowing members
Thiago Macieira [Sat, 22 Dec 2012 21:56:44 +0000]
Fix warnings about shadowing members

util/qqmlpropertymap.h:87:9: error: declaration of 'parent' shadows a member of 'this' [-Werror=shadow]
[and others]

Change-Id: I2ff1a3c133efe2132e74dad00596931a84a7f421
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoListView's highlightMoveDuration should default to -1.
Michael Brasser [Thu, 21 Feb 2013 14:46:56 +0000]
ListView's highlightMoveDuration should default to -1.

Change-Id: Ibb53cc21b4f1f301569cd7724c60cb8df978921a
Reviewed-by: Bea Lam <bea.lam@jollamobile.com>

11 years agoFlickable shouldn't grab the mouse until it starts an effective move.
Andrew den Exter [Sat, 16 Feb 2013 07:21:28 +0000]
Flickable shouldn't grab the mouse until it starts an effective move.

If the boundBehavior prevents the flickable from moving its content
item in response to a drag it shouldn't grab the mouse as that will
prevent a parent MouseArea or Flickable from handling the drag.

Task-number: QTBUG-29718
Change-Id: I3a1be4ed0132b91dca2fb0387ecefd39275a52da
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoMouseArea shouldn't grab the mouse until there is an effective drag.
Andrew den Exter [Fri, 15 Feb 2013 11:29:32 +0000]
MouseArea shouldn't grab the mouse until there is an effective drag.

A MouseArea shouldn't prevent a parent MouseArea or Flickable from
handling a drag event unless it is going to do something useful with
it.

Task-number: 29717
Change-Id: I24016994f6cf9116382ef7faeb50b10e5716e10e
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoTypos: tripple->triple
Frederik Gladhorn [Thu, 21 Feb 2013 12:13:04 +0000]
Typos: tripple->triple

This enables grepping.

Change-Id: Ibf85800b998a02645c50b1b84d42088d16091378
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>

11 years agoStabilize clicking in QQuickTextEdit test
Frederik Gladhorn [Thu, 21 Feb 2013 12:17:45 +0000]
Stabilize clicking in QQuickTextEdit test

This test would try to emulate mouse clicks
and not wait inbetween. That can lead to clicks
spilling over to the next mouse event.

Change-Id: I320f86453215190a1c694ba49c0fc3831dcb60b9
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>

11 years agoMake sure exposeEvents trigger a render pass
Gunnar Sletta [Wed, 20 Feb 2013 18:39:11 +0000]
Make sure exposeEvents trigger a render pass

We needs this on non-compositing window managers to trigger
repaints on partial updates.

Change-Id: Ied5f3e854173c5e00ad7e1222aeb66eb9c96158c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoAdd Test for Animating Qml Dynamic Properties using QPropertyAnimation
David E. Narváez [Sat, 16 Feb 2013 15:42:23 +0000]
Add Test for Animating Qml Dynamic Properties using QPropertyAnimation

Test case for calling QQmlVMEMetaObject::metaCall from
QPropertyAnimationPrivate::updateProperty

Task-number: QTBUG-29082
Change-Id: Iecab74132eb3a843e53356effe3b6bbe4d5a8fb2
Reviewed-by: Alan Alpert <aalpert@rim.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>

11 years agoDon't print leak warnings on exit by default
Gunnar Sletta [Wed, 20 Feb 2013 13:21:53 +0000]
Don't print leak warnings on exit by default

Task-number: QTBUG-29780
Change-Id: I6f35253dbec6346af239c0ab341caad9f4f9b862
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoDoc: Fix paths and add missing project files for QML and Quick examples
Topi Reinio [Tue, 19 Feb 2013 10:16:56 +0000]
Doc: Fix paths and add missing project files for QML and Quick examples

This change fixes a number of 'example path does not exist' warnings
from qdoc, and adds .qmlproject files for pure qml examples so they'll
appear correctly in the example manifest files.

Change-Id: Id0a424c4826fb5d8ebe6c3309bf33b976ff8477c
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>

11 years agoFix QQuickTimeLine::accel() & accelDistance()
J-P Nurmi [Tue, 19 Feb 2013 17:05:10 +0000]
Fix QQuickTimeLine::accel() & accelDistance()

Do not compare real numbers (velocities, accelerations and distances)
to 0.0f, but use qFuzzyIsNull() and qIsNaN().

Task-number: QTBUG-29144
Change-Id: I8fe7ebfbc9f665fa2507e66344d081ef2f43b181
Reviewed-by: Alan Alpert <aalpert@rim.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoQQuickScreen is exposed as an attached property on Window too
Shawn Rutledge [Mon, 18 Feb 2013 15:48:24 +0000]
QQuickScreen is exposed as an attached property on Window too

Change-Id: I13ee75247cbe6238de1b58cf0005c39fc4314e96
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoFixed build when Qt is configured with -no-opengl.
Samuel Rødal [Tue, 19 Feb 2013 13:47:12 +0000]
Fixed build when Qt is configured with -no-opengl.

Task-number: QTBUG-28849
Change-Id: I331ebca76892ce7ffbc6f8e03ff4afe0c8e28d5e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoAdd QQuickTextDocument
Frederik Gladhorn [Fri, 15 Feb 2013 17:25:47 +0000]
Add QQuickTextDocument

Adding QQuickTextDocument as a way to
access the QTextDocument of QQuickTextEdit from C++.

This makes it possible to use a
QSyntaxHighlighter from C++ without exposing more
than one single qml property in the TextEdit.

Change-Id: If1790b591493adcb0b68aef0c8ca706e00450657
Reviewed-by: Alan Alpert <aalpert@rim.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoDocs: Slow Down Animations only exists in qml1
Frederik Gladhorn [Thu, 14 Feb 2013 23:50:58 +0000]
Docs: Slow Down Animations only exists in qml1

The functionality was part of qmlviewer.

Change-Id: Iaf2e19acf54e6773e2b79659f4dc51b92de91dd4
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>

11 years agoMerge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Frederik Gladhorn [Tue, 19 Feb 2013 13:33:13 +0000]
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

11 years agoClarify Component::createObject docs
Alan Alpert [Thu, 14 Feb 2013 10:36:31 +0000]
Clarify Component::createObject docs

Task-number: QTBUG-29650
Change-Id: Ie6f9027ff779f8a513a52b425d9a393c0ecd9c7d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>

11 years agoLet rounded rectangles be antialiased by default
Gunnar Sletta [Tue, 19 Feb 2013 09:47:27 +0000]
Let rounded rectangles be antialiased by default

This was the behavior in Qt Quick 1.1, so we should keep it

Change-Id: I5c6968225e20b06f550c52741fff571088b0100b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoImproved animations in the new render loop
Gunnar Sletta [Fri, 15 Feb 2013 14:35:04 +0000]
Improved animations in the new render loop

To advance animations in line with vsync, we used a dedicated event
from the rendering thread which we fired immediately after sync. This
is a bit elaborate as we know in Gui when sync is complete and we can
just animate there and then.

This means we can remove all animation logic from the rendering
thread, making it simpler.

I also updated the syncAndRender pass so that it does not render
anything if the scene graph reported no changes during the
sync pass. This will prevent non-visual animations and property
updates from triggering render passes which will save quite a
few cycles.

Change-Id: I62bb5484f0673f99abe726fca5a9b424f6b0a317
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoFix embedding images in text elements
Eskil Abrahamsen Blomfeldt [Tue, 19 Feb 2013 09:26:44 +0000]
Fix embedding images in text elements

It seems that the the inner target rect has either been added
recently or its default has been changed to something invalid,
because we need to set it to the same as targetRect for the
image to show up at all.

Task-number: QTBUG-29560
Change-Id: I0fe6b7c5ab07afc780b8ea33a7ccc210861e0821
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoMake the base URL available to QQmlExtensionPlugin
Shawn Rutledge [Mon, 11 Feb 2013 18:07:02 +0000]
Make the base URL available to QQmlExtensionPlugin

This is for the benefit of any plugin which needs to interact with the QML
files or related assets which are also located in its import directory.

Change-Id: Id23ec279b4d017bd3f620c3a7916dac9f9ac29bc
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoAdd qmlRegisterType for Composite Types
Alan Alpert [Thu, 24 Jan 2013 20:13:57 +0000]
Add qmlRegisterType for Composite Types

This is equivalent functionality to registering a composite type in a
qmldir file, a type name in a versioned module is associated with a
given file. This function now allows that to be done easily from C++.

Change-Id: I1cf44b92c3ad7fee593f4f84773c35b56253e628
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>

11 years agoqmlplugindump: don't crash if a composite type was a registered
Shawn Rutledge [Wed, 13 Feb 2013 16:42:56 +0000]
qmlplugindump: don't crash if a composite type was a registered

This doesn't actually result in putting any information about the
composite type into the output, though.

Change-Id: I160702578f0acd22eff98e8afa288b3c9fb20076
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoDoc: Update QtQuickTest documentation
Caroline Chao [Mon, 11 Feb 2013 10:45:34 +0000]
Doc: Update QtQuickTest documentation

Add some information about -input, -functions and -help
command-line options. Add some examples on how to run a
single file and a single function for a QtQuickTest based
test.

Change-Id: Icd5f92bf8541aa412e2cd18d82dec16a85fe78c9
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Mon, 18 Feb 2013 15:07:54 +0000]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I33db683ebf12248b2ed14eeaf65c4bcade14bfbf

11 years agoAdd Composite Types to QQmlType
Alan Alpert [Mon, 17 Dec 2012 05:24:14 +0000]
Add Composite Types to QQmlType

When a composite type is loaded from a QML file, it now generates a
QQmlType entry in QQmlMetaTypeData.

Change-Id: I9b127dff7955456aacb25138fa6ea8efb7bb9221
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoDoc: Correcting typo "without with"
Marcel Krems [Thu, 7 Feb 2013 03:06:02 +0000]
Doc: Correcting typo "without with"

Change-Id: Ibacbb9aefe9a333994014aec17a0079477a4618f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>

11 years agoGUI render loop did not render on expose, nor clean up properly.
Gunnar Sletta [Mon, 18 Feb 2013 08:45:24 +0000]
GUI render loop did not render on expose, nor clean up properly.

Change-Id: I6f9ab43ad6d149295487d9f69ceb0131cd142776
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoFix missing TextInput::remove(int start, int end) docs
J-P Nurmi [Fri, 15 Feb 2013 10:28:06 +0000]
Fix missing TextInput::remove(int start, int end) docs

Change-Id: I0c98e713d53391a191435e5c17b58becddf6d451
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>

11 years agoQQuickPlatform: remove QT_{BEGIN,END}_HEADER macro usage
J-P Nurmi [Fri, 15 Feb 2013 13:44:50 +0000]
QQuickPlatform: remove QT_{BEGIN,END}_HEADER macro usage

Change-Id: I219517d740fa7385e923a9e09cb7e241378f8576
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>

11 years agoFolderListModel: prevent assertion failure when filter selects 0 files
Shawn Rutledge [Wed, 13 Feb 2013 13:08:19 +0000]
FolderListModel: prevent assertion failure when filter selects 0 files

If you do nameFilters = "*.foo" and there are no matching files,
there was an assertion failure due to inserting rows from 0 to -1:
ASSERT: "last >= first" in file itemmodels/qabstractitemmodel.cpp

Change-Id: I4a3642906a4588bebc699b8d99438726676fb4ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>

11 years agoEnsure EtcTexture always provides a valid textureId.
Michael Brasser [Fri, 15 Feb 2013 03:18:59 +0000]
Ensure EtcTexture always provides a valid textureId.

Change-Id: I1e7e8095593838f0fc1d78d1cb5a146787f748a7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoDoc: Removed reference to deprecated \badcode command.
Jerome Pasion [Thu, 14 Feb 2013 14:01:52 +0000]
Doc: Removed reference to deprecated \badcode command.

QDoc doesn't differentiate between \badcode and \code. They both look
the same in the output.

Change-Id: Ia0580f7d664ad5e33b48d6511dac7c61349cacce
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>

11 years agoAdd license files mandated by (L)GPL.
Timo Jyrinki [Fri, 8 Feb 2013 07:07:38 +0000]
Add license files mandated by (L)GPL.

Currently only qtbase includes the required LICENSE files, which
are referred to from the code headers. The same files should
be distributed as part of all the modules as well, so that the
(L)GPL licenses are adhered.

These files were wget:d from:

https://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LGPL_EXCEPTION.txt
https://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LICENSE.LGPL
https://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LICENSE.GPL

As an addition to above, added also LICENSE.FDL. All the modules
additionally require it, since they include at least *.qdoc files and in
some cases a couple of others.

File received via
wget http://qt.gitorious.org/qt/qtbase/blobs/raw/stable/LICENSE.FDL

Change-Id: I35cb3523061cfb041084fe9a7e60928c44e224b2
Reviewed-by: Jason McDonald <macadder1@gmail.com>

11 years agoAdd QQmlPlatform (exposed as Qt.platform)
J-P Nurmi [Mon, 14 Jan 2013 17:12:50 +0000]
Add QQmlPlatform (exposed as Qt.platform)

Change-Id: If34603fd8fbd907bc063b52ea31848eabdb49f61
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Alan Alpert <aalpert@rim.com>

11 years agoA MouseArea should not receive move or release events if the press was not accepted.
Michael Brasser [Wed, 13 Feb 2013 04:19:10 +0000]
A MouseArea should not receive move or release events if the press was not accepted.

Change-Id: If70650d7150b224f4460697a953611dd37d57af1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>

11 years agoRemove QPointerBase bic check.
Stephen Kelly [Tue, 12 Feb 2013 20:06:32 +0000]
Remove QPointerBase bic check.

QPointerBase is not public or exported and it is to be removed

Change-Id: Ieb7360a1a01125d4bff20140b02ec71a076440cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>

11 years agoonly instantiate variable when required
Maurice Kalinowski [Wed, 13 Feb 2013 09:02:54 +0000]
only instantiate variable when required

variable is only used for debugging purposes, where debugging part
is inside preprocessor check. Creation of the object should be there
as well.

Change-Id: I6c9e842ad05d8e45f6d67f5e5dedebc896cda157
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>

11 years agoQQuickItem::childAt(x, y) takes child transformations into account
Shawn Rutledge [Tue, 5 Feb 2013 17:11:34 +0000]
QQuickItem::childAt(x, y) takes child transformations into account

Task-number: QTBUG-28706
Change-Id: Ib1738eac1319361398b1898db341d6e4be0fe5fd
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>

11 years agoDesignerSupport: Fix rendering in designer for if new items are added
Marco Bubke [Tue, 12 Feb 2013 13:28:02 +0000]
DesignerSupport: Fix rendering in designer for if new items are added

The SG nodes are exchanged if the hierarchy the Qml hierarchy is changed.
So the SG root node should be always updated for every rendering.

Task-number: QTCREATORBUG-8699
Change-Id: I069142e4c5fc65efc3485017fa000ed7e8f2b350
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>

11 years agoRemove use of QPainter::HighQualityAntialiasing. It has no effect.
Gunnar Sletta [Tue, 12 Feb 2013 08:16:12 +0000]
Remove use of QPainter::HighQualityAntialiasing. It has no effect.

Change-Id: I7e1d07a9f34d6edf9dbe3449d34636f700218532
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoFix extending example.
Gunnar Sletta [Tue, 12 Feb 2013 08:15:25 +0000]
Fix extending example.

The antialiasing was broken due to wrong flag being used and that the
bounds were outside the texture and chapter 5 and 6 did not compile.

Change-Id: Ib7c4d8c276a3cc5583ff794e10ff539720857e0c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoDo pixel conversion on the pixmap decoder thread when possible
Gunnar Sletta [Mon, 11 Feb 2013 10:14:04 +0000]
Do pixel conversion on the pixmap decoder thread when possible

Change-Id: Id991bee5c0a8b260fc1ca4395402970c6a722b5d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

11 years agoDoc: corrected reference to snippet in imageparticle.qdoc
Nico Vertriest [Mon, 28 Jan 2013 15:27:38 +0000]
Doc: corrected reference to snippet in imageparticle.qdoc

Task-number: QTBUG-29101
Change-Id: If731480343fd4d65aa5fca5c184b03c14f2f340e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>

11 years agoDoc: Removed reference to QAbstractItemModel::setRoleNames()
Venugopal Shivashankar [Tue, 5 Feb 2013 15:14:32 +0000]
Doc: Removed reference to QAbstractItemModel::setRoleNames()

This function is deprecated and it is recommended to
reimplement QAbstractItemModel::roleNames() instead.

Task-number: QTBUG-29456
Change-Id: Ib28759fe2349edd32a1b87bac04eb44d625d3e60
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>

11 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Thu, 7 Feb 2013 16:06:03 +0000]
Merge remote-tracking branch 'origin/stable' into dev

Conflicts:
examples/quick/textureprovider/etcprovider.h
src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp
src/qml/doc/qtqml.qdocconf
src/quick/doc/qtquick.qdocconf
tests/auto/quick/qquickflickable/tst_qquickflickable.cpp

Change-Id: I5027b0ee024e00b9525bd45516b7f401ff7d4ae4

11 years agoStabilize resizemodeitem test.
Frederik Gladhorn [Thu, 7 Feb 2013 13:30:48 +0000]
Stabilize resizemodeitem test.

Resizing can take time. Instead of qWait(50)
use QTRY_COMPARE to make sure we give enough time.

Change-Id: I484eca1f4d49381913dc82f405c73de653608493
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>