Initialize variable

Change-Id: Ia54dc43d22b8edaa49634c6a364f87b4a06d659d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
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>
Fix typo in DelegateModelGroup documentation

Change-Id: Ic01f0935c469f85f32699aebaeb1fc6f8b2279fb
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
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>
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>
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>
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>
Bump version

Change-Id: I54ace3320d63c54119084b27eb2c1797166f0b37
Fix crash with cleanup of animators.

We had several separate issues relating to how the jobs were cleaned up.

The first was that upon getting setWindow(0), the animator did not
reset m_controller to 0, leading to the starts() coming after that to
post null jobs to the controller. This would later crash in
beforeNodeSync as the starting job was null.

The second issue was that during shutdown, QQuickAnimatorProxy
would try to delete jobs on the controller which was already
deleted. The controller is deleted on the GUI thread regardless
of render loop, so this was solved with a QPointer.

The third was that we were a bit too aggressive in trying to clean up
jobs on the GUI thread, so we introduced a new bool which gets set to
true in startJob() so that Proxy::deleteJob() knows who owns the job.

Task-number: QTBUG-37833
Change-Id: I1b6221a2c1ce2bfd0758801b950cda00ff6899d0
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Support padding in images stored in atlas texture

If the stride does not match the width of the image, we upload
it line-by-line instead of as one big rect.

Change-Id: I5e08afcf5c35dc810fed25e45255d55d932b2a4c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Fix crashes when calling Array.sort with imperfect sort functions

We can't use std::sort to implement Array.sort. The reason is that
std::sort expects a conformant compare function, and can do weird
things (esp. crash) when the sort function isn't conformant.

Falling back to qSort is not possible, as the method has been
deprecated. So add a copy of the qSort implementation here, and
use that one instead.

Fix the sortint test in tst_qqmlecmascript to have a consistent
sort function for strings, as the result of calling sort is
otherwise undefined according to the ecma standard.

Task-number: QTBUG-39072
Change-Id: I0602b3aa1ffa4de5006da58396f166805cf4a5e2
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
QML: parse .js files as JavaScript, not QML.

When importing a JS library into a QML file with the "import" keyword,
that JS file was parsed in QML mode, disallowing QML keywords like "as".

Task-number: QTBUG-40143
Change-Id: Ie98adceb27544732c2e96657d41170db36bff288
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix crash with foreach on arguments object

We call fullyCreate() on the arguments object when it's initialized
on an foreach iterator. That itself however might trigger an allocation,
which in turn might collect the ForEachIteratorObject, which is missing
a "ProtectThis" in its constructor.

Change-Id: Ib8f7e39201e727cde91cbbe8a82cba78aa980f0d
Task-number: QTBUG-40844
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Move syncTimer measurment to the correct place.

syncTimer was including the time spent waiting for VSYNC on unchanged
frames. This was causing the reported value to be much higher than expected.

Task-number: QTBUG-40556
Change-Id: Ife759b4e27faf2124ab330be8d1f42d15c4d2d33
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>