platform/upstream/qtdeclarative.git
9 years agoBump version
Frederik Gladhorn [Fri, 29 Aug 2014 09:33:28 +0000 (11:33 +0200)]
Bump version

Change-Id: I54ace3320d63c54119084b27eb2c1797166f0b37

9 years agoUse QtQuick.Window 2.2
Kai Koehne [Tue, 26 Aug 2014 10:15:31 +0000 (12:15 +0200)]
Use QtQuick.Window 2.2

Use version 2.2 in the documentation and for the .qmltypes file.

The revision for properties got dropped in commit 7ceca6ac0 , and
is now dropped from the .qmltypes file, too. The removed signals
are also dropped because of that (because they are implicitly
declared by the property, anyway).

Change-Id: Ia14dd403ce1f098cb378bd7940e8f80f32b770a0
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoDoc: Added a link to the QML advanced tutorial
Venu [Thu, 21 Aug 2014 12:52:49 +0000 (14:52 +0200)]
Doc: Added a link to the QML advanced tutorial

This avoids the need to duplicate the example details
that are already covered in the tutorial.

Task-number: QTBUG-37203
Change-Id: If7e762dc1d9a572b83bddffe7982aec9a6363408
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
9 years agoDon't use d->instanceModel after free'ing it
Lars Knoll [Thu, 12 Jun 2014 08:11:09 +0000 (10:11 +0200)]
Don't use d->instanceModel after free'ing it

prevModel points to d->instanceModel and is being
used further down in the code. So reset the pointer
to 0 after freeing the old instanceModel.

Change-Id: I8854ae3e09c8b2fe50ad311f3dbc7b8ed26805e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix crash with early QObject property access
Simon Hausmann [Thu, 21 Aug 2014 11:10:33 +0000 (13:10 +0200)]
Fix crash with early QObject property access

In the reported bug, it can happen that we try to access the compile-time resolved
QObject property of an object that is referenced by id. The binding that uses this is
triggered when the property changes but _also_ when the id referenced object gets either
created or deleted. The first time the binding is evaluated is very early on, when the
id referenced object is not created yet, so the binding evaluation fails. However the
dependency is set up, and so later then the id referenced object is created and the id
property is set on the context, the notification triggers and the binding is re-evaluated.
During that binding evaluation a QObject property access happens by index on an object that
doesn't have its VME meta-object set up yet. Therefore the property access fails and a
crash occurs or the Q_ASSERT(property) assertion fails.

The fix is to set register the id named object in the context _after_ the VME meta-object is
setup.

Task-number: QTBUG-40018
Change-Id: Ic2d7b4a0c49635efe68e93f2f6c316eb65f0c309
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix typo in DelegateModelGroup documentation
Albert Astals Cid [Thu, 21 Aug 2014 13:39:56 +0000 (15:39 +0200)]
Fix typo in DelegateModelGroup documentation

Change-Id: Ic01f0935c469f85f32699aebaeb1fc6f8b2279fb
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
9 years agoProtect some members in QQmlObjectCreator
Lars Knoll [Mon, 18 Aug 2014 10:38:24 +0000 (12:38 +0200)]
Protect some members in QQmlObjectCreator

Avoid dangling pointers when nested incubators are being used.

Task-number: QTBUG-40437
Change-Id: I73922d2f373b2efbc00983305cdea9e8d60f0c41
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoInitialize variable
Lars Knoll [Thu, 12 Jun 2014 08:19:12 +0000 (10:19 +0200)]
Initialize variable

Change-Id: Ia54dc43d22b8edaa49634c6a364f87b4a06d659d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoDon't abuse new to do a reinterpret_cast
Lars Knoll [Thu, 12 Jun 2014 08:52:32 +0000 (10:52 +0200)]
Don't abuse new to do a reinterpret_cast

Using new to do a reinterpret_cast is rather confusing.
Also protect the list model case against self-assignment
which could lead to memory corruption.

Change-Id: I10b81644d0004d4a50a5a74e5b8c58e27cbe6934
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoProtect incubation against its creator being deleted.
Gunnar Sletta [Thu, 21 Aug 2014 09:59:03 +0000 (11:59 +0200)]
Protect incubation against its creator being deleted.

Change-Id: Ica7ed02c9b67243310ddce3feaf91935b699086d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoAdd 5.3.2 changelog for qtdeclarative
Alan Alpert [Wed, 20 Aug 2014 18:02:54 +0000 (11:02 -0700)]
Add 5.3.2 changelog for qtdeclarative

Change-Id: I33e8149ec9e2f7ecfebb7f55de0dbb291805be93
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoFix crash with recursively loading cached compilation units
Simon Hausmann [Tue, 24 Jun 2014 08:35:42 +0000 (10:35 +0200)]
Fix crash with recursively loading cached compilation units

When a cached compilation unit depends on an import that is implemented as a
Qml C++ plugin and that plugin in turn loads an asynchronous component that is
cached, we would get a crash in the typeloader and a failing assertion
(ASSERT: "d->m_mainThreadWaiting == false" in file qml/ftw/qqmlthread.cpp, line 300)

This is because we did not implement the asynchronous loading within the loader
thread for cached compilation units. This is simply done using a posted event,
using the same mechanism used for other async load methods.

Change-Id: Iefce67ab634ce26122c348dcdfc8e66b00fec671
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix typo in StateChangeScript documentation.
Mitch Curtis [Mon, 18 Aug 2014 16:30:35 +0000 (18:30 +0200)]
Fix typo in StateChangeScript documentation.

Change-Id: Iec72331c183ea02680bad01f04eae82ebd815cdb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoAdded the QtSQL dependency info. to the project file
Venu [Wed, 13 Aug 2014 14:26:32 +0000 (16:26 +0200)]
Added the QtSQL dependency info. to the project file

Without this information the app fails to find the plugin
required to load the QtQuick.LocalStorage module on Android.

Task-number: QTBUG-37203
Change-Id: I245012e78ab8d1fe3205e08939f4baec58c20759
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
9 years agotst_dialogs: verify that rootObject is valid
Robin Burchell [Mon, 11 Aug 2014 09:23:42 +0000 (11:23 +0200)]
tst_dialogs: verify that rootObject is valid

if there's an error during loading, it's much easier to spot if this fails
rather than crashes.

Change-Id: If0106729e18768819da8a877959a095398af8547
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agotst_dialogs: QTRY_ on the expression (spyVisibilityChanged.count) not the variable.
Robin Burchell [Mon, 11 Aug 2014 09:23:47 +0000 (11:23 +0200)]
tst_dialogs: QTRY_ on the expression (spyVisibilityChanged.count) not the variable.

We only assign to the variable once, so the value may not change in time.

Change-Id: I54ac7faad60d3984bfde4606aaf7e30a2340ba3e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
9 years agoThe cached objects can be deleted, so keep them in a QPointer.
Gunnar Sletta [Thu, 14 Aug 2014 11:53:11 +0000 (13:53 +0200)]
The cached objects can be deleted, so keep them in a QPointer.

Change-Id: Ieaebd2e7b9823cbe22efc331e42ceab8fbbda0e8
Task-number: QTBUG-40201
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix potential deadlook in threaded renderloop.
Gunnar Sletta [Thu, 14 Aug 2014 06:38:12 +0000 (06:38 +0000)]
Fix potential deadlook in threaded renderloop.

Change-Id: I415e632aa4e584c8fca745581f25a676db0eae42
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agoAdded a signal handler
Venu [Wed, 13 Aug 2014 12:35:20 +0000 (14:35 +0200)]
Added a signal handler

Without the onHeightChanged signal handler the transition
of the NumberPad from left to right is incomplete especially
on a mobile device where the window is scaled to fit the view.
So the NumberPad ends up hidden behind the Display.

Task-number: QTBUG-36086
Change-Id: Iab021c9f2572a4ac83bc393dddc24ddd31849cb4
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoFix typo in Context2D documentation.
Mitch Curtis [Tue, 12 Aug 2014 13:10:36 +0000 (15:10 +0200)]
Fix typo in Context2D documentation.

Change-Id: Ib6e2436ba383a2caf78ac359883338016c2b7668
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
9 years agoDisable threaded FBO canvas drawing when not supported.
Gunnar Sletta [Tue, 12 Aug 2014 13:06:04 +0000 (15:06 +0200)]
Disable threaded FBO canvas drawing when not supported.

Change-Id: I1e8300c61ba31a5400fc43f85a9c39d2245b4518
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
9 years agoV4 JIT: fix JS stack frame size calculation.
Erik Verbruggen [Tue, 12 Aug 2014 14:56:39 +0000 (16:56 +0200)]
V4 JIT: fix JS stack frame size calculation.

StackLayout::calculateJSStackFrameSize now returns the size in number
of QV4::Value items, instead of bytes. The value is then multiplied in
the assembler by sizeof(Value) to get the number of bytes. Previously,
the return value was number of bytes, which also got multiplied.

A direct effect is that the JS stack size will be ~87% smaller, with
the nice effect that the GC will run faster (less roots on the stack).
It also won't retain objects whose reference accidentally ended up on
the stack below the used portion for the current function, so possibly
freeing (more) objects (earlier) than before.

Change-Id: Idd5a9c173e641c03e6b8a6fe743e403eda34dfe0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoCorrect strokeRect documentation.
Mitch Curtis [Tue, 12 Aug 2014 09:36:26 +0000 (11:36 +0200)]
Correct strokeRect documentation.

Change-Id: I81c61f3b32819e45e15b2be472e71e48fac0c148
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
9 years agoSilence harmless compiler warning.
Gunnar Sletta [Mon, 11 Aug 2014 12:30:35 +0000 (14:30 +0200)]
Silence harmless compiler warning.

AlignJustify is not a tested value, but the compiler warning
can throw you off, so best to keep it quiet.

Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
9 years agobenchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that don't...
Robin Burchell [Mon, 11 Aug 2014 10:41:00 +0000 (12:41 +0200)]
benchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that don't build.

Change-Id: I4d2e9bf3a520636c568a6b58e311994693446c97
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agobenchmarks/particles: fix projects to actually build
Robin Burchell [Mon, 11 Aug 2014 10:35:47 +0000 (12:35 +0200)]
benchmarks/particles: fix projects to actually build

Change-Id: I3edb05279119b921b50a0329dfd47f0ff2cdb9bc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoFix compilation of tst_compilation (:-P) benchmark.
Robin Burchell [Mon, 11 Aug 2014 10:13:46 +0000 (12:13 +0200)]
Fix compilation of tst_compilation (:-P) benchmark.

Change-Id: I7bbf24d816a356f100d7e2c5a8e7a81218f0f54d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoAvoid double deletion when deleting an incubating component.
Martin Jones [Sat, 9 Aug 2014 12:01:08 +0000 (22:01 +1000)]
Avoid double deletion when deleting an incubating component.

The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing
the guards in QQmlIncubatorPrivate::incubate() when a deletion was
detected.

If we detect a deletion, leave the guards in place, to be handled in
QQmlIncubatorPrivate::clear().

Task-number: QTBUG-40685
Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
9 years agoInvalidate the scenegraph properly in the rendercontrol
Laszlo Agocs [Tue, 5 Aug 2014 12:53:34 +0000 (14:53 +0200)]
Invalidate the scenegraph properly in the rendercontrol

Taking the persistent flags from the QQuickWindow was a bad idea. These
are not applicable to the case when an application drives the scene via
QQuickRenderControl. Once stop() is called, all resources must be
released since the context itself will typically be destroyed afterwards.

This is a backport of 0b0bb319578bb2e2eced3a80ce3876a4408b72a7 in dev.

On top of this, stop() becomes invalidate() since the original
invalidate() function is never used by anyone. This naming is much cleaner
and is consistent with QSGContext and friends.

Task-number: QTBUG-40505
Task-number: QTBUG-40435
Change-Id: I398f1bda31f335c3508b238f0328305d3cd79ffd
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoFix crash when loading invalid QML with behavior on invalid group property
Simon Hausmann [Fri, 1 Aug 2014 08:13:06 +0000 (10:13 +0200)]
Fix crash when loading invalid QML with behavior on invalid group property

Behaviors require the creation of a meta-object. However when trying to
create a behavior on a non-existent group property, we don't have a
base meta-object to base the "new" meta-object on, therefore this patch
adds a null pointer check.

The error in the QML file itself will be caught later on. The added test
ensures that as well as that it doesn't crash of course.

Change-Id: If73116053464e7e69b02ef59e8387060835083c8
Task-number: QTBUG-40369
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoFix crash when animators are deleted just after being started.
Gunnar Sletta [Wed, 6 Aug 2014 09:01:06 +0000 (11:01 +0200)]
Fix crash when animators are deleted just after being started.

Change-Id: I35850e279dae596edb9a1b93143d6aa195221b41
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
9 years agoDon't try to reload QQuick images when changing to null screen
Taylor Braun-Jones [Thu, 31 Jul 2014 23:47:04 +0000 (19:47 -0400)]
Don't try to reload QQuick images when changing to null screen

When a QGuiApplication is destructing, a screen change occurs causing
QQuickImageBase to reload images ultimately resulting in "QPixmap: Must
construct a QGuiApplication before a QPixmap". This patch fixes the
issue (except for systems which multiple screens, which is a separate
issue).

Task-number: QTBUG-40539
Change-Id: I4bafc9790741204e90190a4491ac7a9393d0d0a7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoClarify Component.onCompleted/onDestruction docs
Gunnar Sletta [Tue, 5 Aug 2014 06:16:14 +0000 (08:16 +0200)]
Clarify Component.onCompleted/onDestruction docs

Change-Id: I86bb6b85043282f4f46a685e30b435a2f7430430
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
9 years agoFix fbo creation and resize logic in QQuickWidget
Laszlo Agocs [Tue, 5 Aug 2014 15:16:56 +0000 (17:16 +0200)]
Fix fbo creation and resize logic in QQuickWidget

This corrects two issues:

1. Recreating the fbo twice when the widget is shown. Calling
createFramebufferObject() is not necessary in this case since createContext()
will trigger this anyhow due to scenegraphInitialized().

2. Avoid recreating the fbo when the size is the same as before. Some platforms
are keen on sending resize events with the same size. These should be ignored.
What's worse, some platforms (cocoa) generate a resize on exitting (Cmd-Q)
and not ignoring the resize at that stage is dangerous since the scenegraph
is already invalidated.

Task-number: QTBUG-40505
Change-Id: I21ff418fde449aa15eef4d6593e7a518861fcde1
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoFix Qt.include with cached compilation units and resources
Simon Hausmann [Mon, 4 Aug 2014 13:27:24 +0000 (15:27 +0200)]
Fix Qt.include with cached compilation units and resources

Similar to the worker scripts we also need to do a lookup for cached
scripts here. Added also a test to ensure that Qt.include works correctly
from Qt resources.

Change-Id: Idb67af3da4b0cc91edbd3d2746d074fd68ed8bf0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
9 years agoSynchronize PathView gesture grabbing with other items.
Martin Jones [Wed, 23 Jul 2014 06:07:31 +0000 (16:07 +1000)]
Synchronize PathView gesture grabbing with other items.

PathView didn't attempt to grab the gesture at the same event as other
items. This prevented PathView from rightfully claiming the gesture
before lower items in the stack. Use the same threshold test for
PathView as used elsewhere.

Task-number: QTBUG-37859
Change-Id: Ic57cb805ac979e41c3e35d86b2e7db781e61d69d
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
9 years agoFix FBO recreated every time the QSG node is updated under some conditions
Taylor Braun-Jones [Fri, 1 Aug 2014 14:48:37 +0000 (10:48 -0400)]
Fix FBO recreated every time the QSG node is updated under some conditions

When textureFollowsItemsSize is true and the item width/height are (1)
not precise integer values or (2) less than the minimum FBO
width/height, then QQuickFramebufferObject will delete and recreate the
FBO every time the QSG node is updated. This patch fixes the issue.

Task-number: QTBUG-40548
Change-Id: I532aaaa88a5c604ee7cc1fd8f0acb0601c5a94fb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoRun autotests for Canvas.renderTarget == FramebufferObject also.
Gunnar Sletta [Fri, 1 Aug 2014 09:25:55 +0000 (11:25 +0200)]
Run autotests for Canvas.renderTarget == FramebufferObject also.

Change-Id: Id1729966b3b2b75a3bd4ad387b3d7914266fb3a5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoMore QQuickCanvas cleanup handling.
Gunnar Sletta [Fri, 1 Aug 2014 09:22:31 +0000 (11:22 +0200)]
More QQuickCanvas cleanup handling.

Avoid calling into QQuickContext2D from QQuickContext2DTexture
after QQuickContext2D has been deleted. We acheive this by

1. Giving the texture a direct pointer to the gl context and
   and surface, so that it doesn't need to go through m_context
   to get to them (which may have been deleted).

2. Protect access to QQuickContext2DTexture::m_context with
   a mutex and make sure it is set to 0 in a safe manner
   when the QQuickContext2D object is deleted.

Change-Id: Ie0a30f9fc46f844224838a7cdf2f28a62e8ce322
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoMake canvas cleanup work propertly...
Gunnar Sletta [Wed, 30 Jul 2014 15:11:02 +0000 (17:11 +0200)]
Make canvas cleanup work propertly...

Depending on which mode we are in, we need to run cleanup
on the right thread and in the right way.

Image canvas doesn't contain any GL resources and can be nuked
right away. The actual QSGTexture is managed by the node, so we
don't need to worry about it.

For FBO it is a bit more complicated.
 - Threaded: We create a cleanup handler that runs makeCurrent
   deleteTexture and doneCurrent and then release the surface
   on the GUI thread.
 - Immediate: Same as threaded, just right away
 - Cooperative: Schedule the texture to be deleted on the
   next sync. The Context doesn't have its own GL context
   in this case, so don't worry about it.

Change-Id: I2d0ae7acfa05561faa52f3cacd767eb18cabaf02
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoUse the current context to resolve extensions.
Gunnar Sletta [Wed, 30 Jul 2014 14:31:36 +0000 (16:31 +0200)]
Use the current context to resolve extensions.

When updating the code to not use direct gl calls, this
code was changed to use the context's gl context. The
context doesn't have a context when the rendering happens
on the same thread as the scene graph rendering and
we get a crash.

Change-Id: I8adf62c0ed12bb055982a71ba59af76afeefcca1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
9 years agoqmlplugindumper: do not pop up a window if an assert is triggered
Fawzi Mohamed [Wed, 30 Jul 2014 12:49:26 +0000 (14:49 +0200)]
qmlplugindumper: do not pop up a window if an assert is triggered

On windows the debug version of qmlplugindumper used to show a panel on
assert failure. Failure should be silent.

Done-with: Thomas Hartmann <thomas.hartmann@digia.com>
Task-number: QTCREATORBUG-12644
Change-Id: Ib5036754b37cdd5e3820e0cfd60b3ef7df3f1fb6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
9 years agoFix assertion: ASSERT: "hasException" in file jsruntime/qv4engine.cpp, line 933
Robin Burchell [Thu, 31 Jul 2014 10:21:16 +0000 (12:21 +0200)]
Fix assertion: ASSERT: "hasException" in file jsruntime/qv4engine.cpp, line 933

This was seemingly tripped by trying to catch the exception twice: once with
catchException and once with catchExceptionAsQmlError.

Change-Id: I7176d56fe6e6f748e80d0894e314ed2b8f6e751d
Done-by: Mikko Harju <mikko.harju@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
9 years agoMerge remote-tracking branch 'origin/stable' into 5.3
J-P Nurmi [Wed, 30 Jul 2014 13:41:10 +0000 (15:41 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Conflicts:
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp

Change-Id: I80584b4f7d62cd86d3449e19176118e3bed886c1

9 years agoFix QQmlDelegateModel getting out of sync
Dan Vrátil [Tue, 29 Jul 2014 09:11:11 +0000 (11:11 +0200)]
Fix QQmlDelegateModel getting out of sync

Fixes a regression introduced by a0aefe1, which caused that the
source data model and adaptorModel could sometimes get out of
sync.

Change-Id: Ia6b5fc380cc6cf6549ae857e6da54e088a5dadb5
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
9 years agoQQuickWindow: add some links to resetOpenGLState
Giuseppe D'Angelo [Mon, 28 Jul 2014 19:11:59 +0000 (21:11 +0200)]
QQuickWindow: add some links to resetOpenGLState

... or people might not find it. So link it from the docs of the
various signals which expect the users to leave the GL state as
they found it.

Change-Id: I1ae41958449ded110aa2398b415d593bf04d2b7f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoRemove metaobject revisioning for QQuickScreenAttached
Alan Alpert [Fri, 11 Jul 2014 01:50:02 +0000 (18:50 -0700)]
Remove metaobject revisioning for QQuickScreenAttached

Attached property versioning is not currently fully supported. Initial
approach was to add the version tags and not enforce them until you
could version attached properties. However the QML engine is currently
erroring on this. Specific error example:
""Screen.onNameChanged" is not available due to component versioning "

Workaround recommended in the JIRA task is to just not version them,
until attached property versioning is fully implemented.

Task-number: QTBUG-35569
Change-Id: I5ded7eb223ec00f70d847b3fac09ec240d5d7901
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoDon't dereference null pointer.
Sérgio Martins [Sat, 26 Jul 2014 17:31:22 +0000 (18:31 +0100)]
Don't dereference null pointer.

Task-number: QTBUG-40448
Change-Id: I75eb886ae765191101d6b01ebd038211e5fe8fba
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFlickable: Cancel interaction on interactive changes
Albert Astals Cid [Wed, 23 Jul 2014 13:40:42 +0000 (15:40 +0200)]
Flickable: Cancel interaction on interactive changes

Otherwise if you have a listview with a flickable inside with a mouseare inside
the pressed is never set to false if you make the interactive property of the
outer list depend on the moving of the inner flickable. This makes that when
later you change currentIndex of the list and you have
StrictlyEnforceRange set, the list won't move because it still thinks it is pressed

Change-Id: I2c2021f486fc0a31840c3f2199bc7cb76dc01e3e
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years ago Don't try to draw shader effect sources with dims < 0.
Gunnar Sletta [Mon, 28 Jul 2014 08:11:05 +0000 (10:11 +0200)]
 Don't try to draw shader effect sources with dims < 0.

Task-number: QTBUG-40099
Change-Id: I0eb0d877963a9394765ec8e0f10569a98a263743
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoQQuickMouseArea: Mark override functions with Q_DECL_OVERRIDE
Albert Astals Cid [Thu, 24 Jul 2014 09:37:49 +0000 (11:37 +0200)]
QQuickMouseArea: Mark override functions with Q_DECL_OVERRIDE

Change-Id: I6fb5fd48a24affc463c5eb7ea0e80c81fab33f66
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoFix interaction of garbage collector with JS objects during QML type instantiation
Simon Hausmann [Wed, 14 May 2014 14:04:33 +0000 (16:04 +0200)]
Fix interaction of garbage collector with JS objects during QML type instantiation

It may happen that during the lengthy process of instantiating a tree of
objects for QML, the garbage collector runs.

For objects created by QML we support different ownership models, for example
in QtQuick visual parents keep their visual children alive, despite perhaps a
lack of QObject parentship. That ownership becomes active once the QML
autoparent function has assigned the correct visual parent, which happens after
object instantiation (after QQmlObjectCreator).

Similarly when a composite type is created, its QObject parent is only set
after all properties have been set. The root QObject is kept alive through a
special boolean, but if the sub-objects aren't children yet, their JS wrapper
might get deleted. For composite types with var properties, that also means
their var properties get deleted, such as the model property of TableView.qml
in the bug report.

In the future we want to support creating QWidget hierarchies with QML, which
also for layouts may rely on a delayed parent assignment for layouts.

To accommodate all this, this patch introduces an array on the JS stack that
keeps track of all JS wrappers for all QObjects created. This array is alive
during object tree creation. Afterwards, the different ownership models take
over, for example the auto parent function assigning a visual parent.

This patch also fixes an off-by-one in the total object count calculation
for composite types, where when instantiating a composite type as a sub-object
we counted the sub composite's object count but forgot the object itself.

Task-number: QTBUG-38835
Task-number: QTBUG-39966
Change-Id: I6104b2434510642081e0c54793ed296adeca7481
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoDo not use mark() when marking ExecutionContexts
Lars Knoll [Fri, 25 Jul 2014 08:13:50 +0000 (10:13 +0200)]
Do not use mark() when marking ExecutionContexts

Some execution contexts in the parent chain can be allocated
on the C stack instead of the GC heap. Calling mark() on those would
push them onto the GC stack (which is identical to the JS stack).
In rare cases the reference can survive to live into the next call to
gc(), causing invalid accesses to already deleted contexts.

Change-Id: I709f58de27be9386cf70707c84e4c86c7c303fa7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoDon't recreate header and footer unnecessarily
Martin Jones [Wed, 23 Jul 2014 07:51:37 +0000 (17:51 +1000)]
Don't recreate header and footer unnecessarily

The only time that they need to be recreated is if the orientation
changes (even then, a good implementation could handle it, but no
point requiring that now).

Task-number: QTBUG-40375
Change-Id: Id0215fb812724827bb139cda8f8dc6208c703852
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
10 years agoClear the visibleImgTags list when setting up the text layout
Andy Shaw [Tue, 24 Jun 2014 12:05:43 +0000 (14:05 +0200)]
Clear the visibleImgTags list when setting up the text layout

Since the text layout is being redone then the visibleImgTags will be
repopulated, therefore it should be cleared first so that it doesn't have
duplicated entries.

Change-Id: I415f94326e156ae265bc044544f2bb0d7146ce4c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoImprove programmatic flicking of ListView (and Flickable).
Michael Brasser [Thu, 24 Jul 2014 00:39:26 +0000 (19:39 -0500)]
Improve programmatic flicking of ListView (and Flickable).

Fix bug when programmatically flicking ListView after a real flick in the
opposite direction. Also ensure a programmatic flick can flick past
bounds when situated at the bounds and DragAndOvershootBounds is set.

Task-number: QTBUG-38209
Change-Id: If4a2f65d0e7cb620b9af21f8a25a8a8797976125
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years agoV4: work around a bug in libc++'s std::vector<bool>
Erik Verbruggen [Tue, 1 Jul 2014 11:34:31 +0000 (13:34 +0200)]
V4: work around a bug in libc++'s std::vector<bool>

The ++operator of std::vector<bool>::iterator in libc++ has a bug when
using it on an iterator pointing to the last element. It will not be set
to ::end(), but beyond that. (It will be set to the first multiple of
the native word size that is bigger than size().)

See http://llvm.org/bugs/show_bug.cgi?id=19663

Task-number: QTBUG-39911
Change-Id: Ic244d9c90ee6b596261a6e322301c411a14820a8
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoQQmlComponent::create(): visual items must have a visual parent.
Mitch Curtis [Thu, 24 Jul 2014 08:13:42 +0000 (10:13 +0200)]
QQmlComponent::create(): visual items must have a visual parent.

There seems to be a bit of confusion about this on public forums.

Change-Id: Id193de541e7d7e353dc5d75b64a15f481e2cf8b6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoClean up the textures when deleting the content
Andy Shaw [Tue, 24 Jun 2014 12:01:35 +0000 (14:01 +0200)]
Clean up the textures when deleting the content

Whenever the content is deleted then the textures will be recreated so the
existing list of textures should be deleted and cleared to reclaim the
memory.

Change-Id: I4fdf77817a5f4b2330414e9d113c669d18de9af8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoSchedule layout changes to avoid refill() recursion.
Mitch Curtis [Mon, 21 Jul 2014 12:55:30 +0000 (14:55 +0200)]
Schedule layout changes to avoid refill() recursion.

Otherwise we add duplicate item delegates.

Task-number: QTBUG-40298
Change-Id: I8a2221d72f458c892720a71d87513808a5d725a6
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years agoAdd autotest for incorrect steal of flick.
Michael Brasser [Wed, 26 Mar 2014 19:32:29 +0000 (14:32 -0500)]
Add autotest for incorrect steal of flick.

Task-number: QTBUG-37859
Change-Id: I86aa231ba264569a21d0b6cd109096eb5dd7a2fe
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years agoDo not crash AtlasTexture if image is null
David Edmundson [Tue, 15 Jul 2014 13:27:30 +0000 (15:27 +0200)]
Do not crash AtlasTexture if image is null

Change-Id: I77ae68f523641a2e6b75623200f65407b64e1b40
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix Node object leak in QQuickTextEditPrivate
Liang Jian [Thu, 17 Jul 2014 07:40:18 +0000 (15:40 +0800)]
Fix Node object leak in QQuickTextEditPrivate

Delete Node objects stored in textNodeMap at two places to prevent leak.

Change-Id: I8eb0d1af900c94e1fab2f55b689de393e674f0aa
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
10 years agoshift and unshift fail for QQmlSequence types
Martin Jones [Wed, 16 Jul 2014 03:20:53 +0000 (13:20 +1000)]
shift and unshift fail for QQmlSequence types

QQmlSequence is a Custom array type, so must use the generic
shift/unshift implementation.

Task-number: QTBUG-40244
Change-Id: I491d9dc87a3a204daad4cf7460ffac81165056a5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoCheck for window != 0 in QuickTestResult::grabImage().
Friedemann Kleint [Mon, 21 Jul 2014 07:21:30 +0000 (09:21 +0200)]
Check for window != 0 in QuickTestResult::grabImage().

Task-number: QTBUG-38945
Change-Id: I081434a94899f8a1e2fd7275b67f62d06b56b0c2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
10 years agoDoc: add documentation for the RSS News example
Leena Miettinen [Fri, 27 Jun 2014 16:15:59 +0000 (18:15 +0200)]
Doc: add documentation for the RSS News example

Change-Id: I87d7e43c19c897be3b98b219dacaf0f2bd30c1dd
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoFix typo in documentation
Kai Koehne [Thu, 17 Jul 2014 14:30:34 +0000 (16:30 +0200)]
Fix typo in documentation

Change-Id: Ie250c41943be661b19b5f09731508d6613f4cf82
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoBinding Text width to implicitWidth can result in incorrect layout
Martin Jones [Thu, 10 Jul 2014 06:52:48 +0000 (16:52 +1000)]
Binding Text width to implicitWidth can result in incorrect layout

If the text is not left aligned and the width changes during layout due
to implictWidth changing, the text needs to be laid out again.

Task-number: QTBUG-40161
Change-Id: I1ad679ccdc5595dd749600abe08ed46ac179d7bf
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
10 years agoDocs: fix "classname" indentation in the qmldir specs
J-P Nurmi [Wed, 9 Jul 2014 11:22:30 +0000 (13:22 +0200)]
Docs: fix "classname" indentation in the qmldir specs

Change-Id: Idaaaaa77654c2cd3abb56d0bfd3ed7bac7281632
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoFix role for generic Accessible items
Frederik Gladhorn [Wed, 9 Jul 2014 08:53:06 +0000 (10:53 +0200)]
Fix role for generic Accessible items

Currently QQuickItem specifies Pane as default role which at least on
linux leads to big confusion. Instead use QAccessible::Client which is
in line with QWidget.

Change-Id: I06b287843a0bf1546f16e67c53ea5d2321ba214b
Task-number: QTBUG-40136
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
10 years agoCalqlatr demo: Remove unused files
Niels Weber [Mon, 7 Jul 2014 10:19:25 +0000 (12:19 +0200)]
Calqlatr demo: Remove unused files

There were a few images etc that were never used. Remove them.

Change-Id: I606241903cf098cb495aa06ac4c595fb175cd9fc
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoRemove usage of external dependencies from the RSS News demo
Topi Reinio [Fri, 27 Jun 2014 08:00:24 +0000 (10:00 +0200)]
Remove usage of external dependencies from the RSS News demo

Examples in qtdeclarative shouldn't depend on Qt Quick Controls,
Layouts, or add on modules like Qt Graphical Effects.

Change-Id: Ic069ed3223a4cfebde5263e846ae394aebed0b33
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
10 years agoFix crash on QQmlEngine destruction.
Andrew den Exter [Fri, 27 Jun 2014 02:49:07 +0000 (12:49 +1000)]
Fix crash on QQmlEngine destruction.

QQmlTypeLoader references QQmlImportDatabase in a thread, so change the
declaration order so QQmlTypeLoader is destroyed and its thread stopped
before QQmlImportDatabase is destroyed.

Change-Id: Idfa511cf9625f893c4398f419a74d869169b478d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDon't dereference null QQuickWindowPrivate.
Sérgio Martins [Thu, 3 Jul 2014 12:44:41 +0000 (13:44 +0100)]
Don't dereference null QQuickWindowPrivate.

windowDestroyed() triggers a sendPostedEvent(DeferredDelete) to
cleanup GL resources. If the window was deleted through deleteLater()
it will also be deleted at this point.

Change-Id: I3b0cc0f36c4a543c5fbaa4af107dc4aa0c8b6725
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAdd opt-out environment variable for @2x images
Morten Johan Sørvig [Mon, 19 May 2014 12:42:14 +0000 (14:42 +0200)]
Add opt-out environment variable for @2x images

There are cases where @2x images are in use but
where you don't want the associated behavior:
- You are implementing an image editor
- You are inheriting a resource set which has @2x
  images, but don't want that behavior with Qt.

Add support for disabling @2x behavior with QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING.

Change-Id: Ia570dfe556e0571a19e5ebdc626c4a7e626721b9
Task-id: QTBUG-38485
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
10 years agoDoc: correct link/compilation errors in Qt Declarative
Nico Vertriest [Tue, 8 Apr 2014 11:24:42 +0000 (13:24 +0200)]
Doc: correct link/compilation errors in Qt Declarative

Task-number: QTBUG-34749
Change-Id: I507d54b0568d77c6099a0bd99f5c369b8667032a
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoFix crash in Flickable with pressDelay.
Martin Jones [Wed, 2 Jul 2014 02:12:05 +0000 (02:12 +0000)]
Fix crash in Flickable with pressDelay.

Looks like this was exposed by the touch event compression change.

Task-number: QTBUG-40000
Change-Id: I037c848e0c5d766857dff3162c244213aba847da
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoSkip rssnews demo if xmlpatterns is not present
Laszlo Agocs [Fri, 27 Jun 2014 13:14:33 +0000 (15:14 +0200)]
Skip rssnews demo if xmlpatterns is not present

Otherwise builds without the QtXmlPatterns module will fail.

Change-Id: I11d0b84653f8d59787b09cd9c12977d18be92729
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3.1' into 5.3" into refs/staging/5.3
Frederik Gladhorn [Mon, 30 Jun 2014 12:32:51 +0000 (14:32 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3.1' into 5.3" into refs/staging/5.3

10 years agoDelete objects created by qmlplugindump
Daiwei Li [Tue, 25 Mar 2014 08:07:46 +0000 (01:07 -0700)]
Delete objects created by qmlplugindump

This helps plugin objects to shut down cleanly

Change-Id: I167f63220a35a7428f50715a4cb9072320ef1c87
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
10 years agoAvoid double deletion of QQuickWindow
Shawn Rutledge [Tue, 17 Sep 2013 13:05:04 +0000 (15:05 +0200)]
Avoid double deletion of QQuickWindow

It's uncertain why 4fc0df58b8458052a818e3e970a97457882808e6 added
the call to sendPostedEvents(0, QEvent::DeferredDelete) but now we can
see that it easily results in the destructor calling itself, and
therefore double-deleting its own d_ptr.  removePostedEvents seems
safer to ensure that the window cannot be doubly deleted, in spite
of the qdoc warning that "You should never need to call this function."

Task-number: QTBUG-33436
Change-Id: I4873ebe179dde551407eba1f6baac5f03ca7f177
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix QQmlDelegateModel ignoring layoutChange in certain situations
Dan Vrátil [Mon, 16 Jun 2014 12:10:09 +0000 (14:10 +0200)]
Fix QQmlDelegateModel ignoring layoutChange in certain situations

Fix a regression introduced by commit a0aefe1 which caused the model to
ignore layout changes if d->m_adaptorModel.rootIndex was just a descendant
of any of the parent indexes, or when no parent indexes at all were provided
in the notification.

Task-number: QTBUG-39492
Change-Id: I4c97929d25ef75947ccfcbbe5bc234096689c58d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoFix intermittent crash with older MinGW releases
Robin KAY [Tue, 24 Jun 2014 22:35:22 +0000 (23:35 +0100)]
Fix intermittent crash with older MinGW releases

An alternate code-path was previously added to work around a bad
signature for the SHParseDisplayName() function in older and non-w64
versions of the MinGW headers. This code-path incorrectly passed a
single rather double indirect pointer to the third argument of that
function causing it to produce corrupt data and subsequently crash.
This change modifies the code to instead cast a pointer of the correct
type to the incorrect type expected by the headers.

Task-number: QTBUG-39793
Change-Id: I4d65dea4fc38d7e885468cd23434d8570c311fc2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoDoc: Add documentation for the Maroon in Trouble example
Leena Miettinen [Fri, 30 May 2014 16:01:56 +0000 (18:01 +0200)]
Doc: Add documentation for the Maroon in Trouble example

Change-Id: I8b272894ef6374aeb6ec09275d7ce96d16a6be0f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoMerge remote-tracking branch 'origin/5.3.1' into 5.3
Frederik Gladhorn [Wed, 25 Jun 2014 08:25:44 +0000 (10:25 +0200)]
Merge remote-tracking branch 'origin/5.3.1' into 5.3

Change-Id: Ic4418ade05ff7d89cbb375a25d9fd80353a2317a

10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Frederik Gladhorn [Wed, 25 Jun 2014 08:22:38 +0000 (10:22 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: Iafccb173a9b5569bc9fd1022abb210955519fc61

10 years agoFix crash when deleting component in Component.onComplete through loader
Simon Hausmann [Fri, 20 Jun 2014 15:26:57 +0000 (17:26 +0200)]
Fix crash when deleting component in Component.onComplete through loader

This is a regression introduced with Qt 5.3.0. The recursion watcher code that
is supposed to handle the test case of QTBUG-39775 can detect the recursion
into the object creator. However the boolean that indicates the recursion is a
member of a structure that's deleted afterwards. To avoid access to deleted
memory, this patch simply reference counts data structure shared between the
creators and also wraps the recursion watcher into a convenience class that
also increases/decreases the reference count accordingly.

Change-Id: I8d2e3e200ab1295e89d951e09f187d382a056d5a
Task-number: QTBUG-39775
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoFix memory leak in QQmlComponent::createObject
Simon Hausmann [Sat, 21 Jun 2014 08:56:00 +0000 (10:56 +0200)]
Fix memory leak in QQmlComponent::createObject

Regression introduced with 5.3.0. Prevent the leak of the object creator
on repeated createObject calls by using a scoped pointer.

Change-Id: Ib4fe7c9c6926c2390f7ae78f3287bb7da5f60527
Task-number: QTBUG-39742
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoUpdate QtQuick import value to 2.3
Samuel Gaist [Tue, 3 Jun 2014 20:44:25 +0000 (22:44 +0200)]
Update QtQuick import value to 2.3

The current documentation uses import QtQuick 2.2 which is wrong since
there are new APIs like mipmap for the QML Image element.

Task-number: QTBUG-39302
Change-Id: I3cc3a1522efd85090c3b4011429fa16b95e79435
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoSet locked state while locking for grab.
Gunnar Sletta [Thu, 5 Jun 2014 05:11:54 +0000 (07:11 +0200)]
Set locked state while locking for grab.

Change-Id: If4b8fa77e6e3a288487a011e83791ad6a189675c
Reviewed-by: Manish Sharma <83.manish@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoQQmlObjectCreator: Clear sharedState componentAttached in destruction/clear
Albert Astals Cid [Tue, 17 Jun 2014 11:10:35 +0000 (13:10 +0200)]
QQmlObjectCreator: Clear sharedState componentAttached in destruction/clear

Fixes crash when delegate is being deleted while not totally instantiated

Valgrind trace:
==15748== Invalid write of size 8
==15748==    at 0x57A02DB: QQmlComponentAttached::~QQmlComponentAttached() (qqmlcomponent.cpp:985)
==15748==    by 0x57A0318: QQmlComponentAttached::~QQmlComponentAttached() (qqmlcomponent.cpp:989)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D34655: QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D348A5: QQmlPrivate::QQmlElement<QQuickFocusScope>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D34655: QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748==    by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748==    by 0x6689607: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x5D1B012: QQuickItem::event(QEvent*) (qquickitem.cpp:7114)
==15748==    by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x665B826: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66B1242: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x40711B: startShell(int, char const**, void*) (main.cpp:171)
==15748==    by 0x407A74: main (main.cpp:227)
==15748==  Address 0x1be83870 is 64 bytes inside a block of size 112 free'd
==15748==    at 0x4C2C2BC: operator delete(void*) (vg_replace_malloc.c:503)
==15748==    by 0x5815FB0: QQmlObjectCreator::~QQmlObjectCreator() (qqmlobjectcreator.cpp:156)
==15748==    by 0x57A52AA: QQmlIncubatorPrivate::clear() (qscopedpointer.h:62)
==15748==    by 0x57A53C6: QQmlIncubator::clear() (qqmlincubator.cpp:577)
==15748==    by 0x5DCEA20: QQuickLoader::setActive(bool) (qquickloader.cpp:350)
==15748==    by 0x5DCF6D2: QQuickLoader::qt_metacall(QMetaObject::Call, int, void**) (moc_qquickloader_p.cpp:277)
==15748==    by 0x579DC66: QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1322)
==15748==    by 0x579E76E: QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1246)
==15748==    by 0x579F2F9: QQmlPropertyPrivate::writeBinding(QObject*, QQmlPropertyData const&, QQmlContextData*, QQmlJavaScriptExpression*, QV4::ValueRef, bool, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1578)
==15748==    by 0x580CF69: QQmlBinding::update(QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlbinding.cpp:266)
==15748==    by 0x580D5BD: QQmlBinding::expressionChanged(QQmlJavaScriptExpression*) (qqmlbinding_p.h:105)
==15748==    by 0x57E6156: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:81)
==15748==    by 0x57E6130: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:76)
==15748==    by 0x57E6130: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:76)
==15748==    by 0x5788FA3: QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) (qqmlengine.cpp:721)
==15748==    by 0x6688232: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x57882A7: QQmlData::destroyed(QObject*) (qqmlengine.cpp:1658)
==15748==    by 0x668FD7D: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x55E8B64: QQmlDMAbstractItemModelData::~QQmlDMAbstractItemModelData() (qqmladaptormodel.cpp:95)
==15748==    by 0x58643DC: QQmlDelegateModelPrivate::release(QObject*) (qqmldelegatemodel.cpp:520)
==15748==    by 0x586440C: QQmlDelegateModel::release(QObject*) (qqmldelegatemodel.cpp:536)
==15748==    by 0x5DFED4F: QQuickItemViewPrivate::releaseItem(FxViewItem*) (qquickitemview.cpp:2349)
==15748==    by 0x5DBAB94: QQuickGridViewPrivate::addVisibleItems(double, double, double, double, bool) (qquickgridview.cpp:497)
==15748==    by 0x5DFC94E: QQuickItemViewPrivate::refill(double, double) (qquickitemview.cpp:1751)
==15748==    by 0x5DFF26A: QQuickItemViewPrivate::layout() (qquickitemview.cpp:1859)
==15748==    by 0x5D275F7: QQuickWindowPrivate::polishItems() (qquickwindow.cpp:271)
==15748==    by 0x5D02B7D: QSGThreadedRenderLoop::polishAndSync(QSGThreadedRenderLoop::Window*) (qsgthreadedrenderloop.cpp:1150)
==15748==    by 0x5D03167: QSGThreadedRenderLoop::event(QEvent*) (qsgthreadedrenderloop.cpp:1235)
==15748==    by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66B00CC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66B03F0: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748==    by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748==    by 0x40711B: startShell(int, char const**, void*) (main.cpp:171)
==15748==    by 0x407A74: main (main.cpp:227)

Change-Id: I2c7d38fa5a2566520173bff7ad4e5f9c966d083e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoInitialize velocity
Albert Astals Cid [Mon, 16 Jun 2014 14:51:17 +0000 (16:51 +0200)]
Initialize velocity

Fixes valgrind warning
==21054== Conditional jump or move depends on uninitialised value(s)
==21054==    at 0x5DAE6D4: QQuickListView::viewportMoved(QFlags<Qt::Orientation>) (qquicklistview.cpp:2789)
==21054==    by 0x5D9ED76: QQuickFlickablePrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquickflickable.cpp:296)
==21054==    by 0x5DFC438: QQuickItemViewPrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquickitemview.cpp:1158)
==21054==    by 0x5DAC6A2: QQuickListViewPrivate::itemGeometryChanged(QQuickItem*, QRectF const&, QRectF const&) (qquicklistview.cpp:1369)
==21054==    by 0x5D0D5F2: QQuickItem::geometryChanged(QRectF const&, QRectF const&) (qquickitem.cpp:3365)
==21054==    by 0x5D11822: QQuickItem::setY(double) (qquickitem.cpp:5858)
==21054==    by 0x5C84FED: QQuickTimeLinePrivate::advance(int) (qquicktimeline.cpp:826)
==21054==    by 0x5C85155: QQuickTimeLine::updateCurrentTime(int) (qquicktimeline.cpp:702)
==21054==    by 0x58576FA: QAbstractAnimationJob::setCurrentTime(int) (qabstractanimationjob.cpp:497)
==21054==    by 0x5857BDD: QQmlAnimationTimer::updateAnimationsTime(long long) (qabstractanimationjob.cpp:119)
==21054==    by 0x640C7EC: QUnifiedTimer::updateAnimationTimers(long long) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x58570C8: QQmlAnimationTimer::startAnimations() (qabstractanimationjob.cpp:152)
==21054==    by 0x66895B5: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x665B826: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x66B1242: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==21054==    by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==21054==    by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==21054==    by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==21054==    by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)

Change-Id: I72e101140b8bee0b6867cf92902e70660c8d21ab
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoImprove RSS News Qt Quick Demo
Topi Reinio [Thu, 12 Jun 2014 13:05:05 +0000 (15:05 +0200)]
Improve RSS News Qt Quick Demo

    - Add main.cpp for launching, use Qt resource system
    - Update feed URLs
    - New layout and images
    - Make the example scalable, react to orientation changes
    - Use graphical effects and animations
    - Display time and link for each news item
    - Fix license headers to use the correct license

Task-number: QTBUG-37203
Change-Id: I6f8941cbdaed78a3dee30305496b3ea7777ba3e3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
10 years agoFix QQmlComponent detailed description.
Mitch Curtis [Tue, 17 Jun 2014 11:35:21 +0000 (13:35 +0200)]
Fix QQmlComponent detailed description.

setParent() => setParentItem()

Task-number: QTBUG-39687
Change-Id: I67dc871a6d3b10af321d1f7b08921dcad0a6f19d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoAdd a QQuickWidget - QQuickView comparison example
Laszlo Agocs [Fri, 6 Jun 2014 14:53:33 +0000 (16:53 +0200)]
Add a QQuickWidget - QQuickView comparison example

Besides serving as a side-by-side test tool for QQuickView and
QQuickWidget (including multisampling), it also demonstrates some
useful practices for rendering 3D content via QQuickFramebufferObject.

Done-with: Paul Olav Tvete <paul.tvete@digia.com>
Change-Id: Ie73e998ee91e32ef1535dd6f0f65c8a69addcc5e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoFix crash in QObjectWrapper
Oleg Shparber [Tue, 17 Jun 2014 22:47:43 +0000 (15:47 -0700)]
Fix crash in QObjectWrapper

This can happen during QObject destruction, when
QObjectPrivate::deleteChildren() itself sets entries
in the children list to zero when deleting. These
zeros cause crash in markChildQObjectsRecursively().

Task-number: QTBUG-38635
Change-Id: I29ad9e793b78ca4e8d73fbb125f46db1b8292f20
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
10 years agoUse QSignalSpy instead of waitFor in tst_qpacketprotocol
Ulf Hermann [Mon, 16 Jun 2014 09:21:01 +0000 (11:21 +0200)]
Use QSignalSpy instead of waitFor in tst_qpacketprotocol

QTcpServer::waitForNewConnection() blocks the event loop and prevents
the client, that runs in the same event loop, from sending anything.
Also, if the connection is established before waitForNewConnection() is
called we're going to wait for another connection, which will never
happen.

It's not clear if this is actually the cause of the test failures but
blocking the event loop is generally a bad idea and the last change to
the test that actually made a difference to the functionality added
exactly that line, see b36bbe3626bc68ac267d7653fa6408a8f258251d.

Task-number: QTBUG-39655
Change-Id: Ic03a4e7cac78155532588476b99449664c343ee2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd changelog for 5.3.1 upstream/5.3.1
Simon Hausmann [Wed, 18 Jun 2014 08:27:05 +0000 (10:27 +0200)]
Add changelog for 5.3.1

Change-Id: I5d9c67a2f89c0c191de9e6de24d068fca17dba0e
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
10 years agoBump version
Oswald Buddenhagen [Tue, 17 Jun 2014 22:28:50 +0000 (00:28 +0200)]
Bump version

Change-Id: I48d18a93971f4595b295aa6a1f70dfbe2b2266a1

10 years agoSeparate renderer out in "OpenGL under QML" example.
Gunnar Sletta [Fri, 13 Jun 2014 11:59:57 +0000 (13:59 +0200)]
Separate renderer out in "OpenGL under QML" example.

The example was promoting very bad practice.

Change-Id: Ibb83780ec33e59ee5aabf65a775705dd0da681e6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>