Fix crash in QQmlDebugService::objectForLocationInfo()

Fixed crash in QQmlDebugService::objectForLocationInfo() where it
was using QObject pointers in the object reference id hash
table that had been deleted.  Now objectForLocationInfo() checks if
the QObject has been deleted and removes it from the object
reference hash before trying to look up the filename, line number,
and column number.

Change-Id: Iba7be7c490e97a2e7685685b0c6e501cfe1e833e
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Improve memory usage of QQuickTextNode.

The typical number of BinaryTreeNodes needed for a text line should be
much lower than 256.

Task-number: QTBUG-32770
Change-Id: I85aa161eb7cb6e55657213304b7577a0a33f1b67
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Doc: createObject: adapted description of example

Plus language/style edits

Restored brief statement QQmlComponent.cpp

Task-number: QTBUG-32222

Change-Id: I07da54bad3e13f163475ed2a0760e66d50795f6f
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Remove C-style casts from public headers.

Task-number: QTBUG-32735

Change-Id: I14c313d17b80dce1826290ddd634f449b315190e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Stop the update timer when no windows are visible

Change-Id: Ib9758a99891829d9bec81996687373d08ecfa055
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Remove unused local variables

Change-Id: I910c47cd404c0c5c1c324e956927966e834b488e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Fix needless conversion from char * to QString

Converting the strings to UTF-16 unconditionally whenever the library is
loaded is overkill. Anyhow, the literals are only passed to methods also
accepting a QLatin1String, so we don't have to convert at all.

Change-Id: I84e813ac989344bc2e359f340696423766392c93
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Doc: Moved QML "plugins" example to "qmlextensionplugins"

The example generates a plugins.html which collides with the
plugins.html from qtbase repository.

Task-number: QTBUG-32580
Change-Id: I47ce9e00378738f7696672e6e47dd3337bb4fafc
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Fix invalid condition in comparisson.

Thanks to clang (top-of-trunk) pointing out that the unary not operator
only applies to the left-hand side of the equality expression.

Change-Id: I093b447d55995a4122aeac042a506eb56f8b2442
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix binop related crashes in the interpreter

if (foo instanceof blah) would crash because we generated a BinOp instruction
with a null aluop pointer. Instanceof, in and add are binops that now require
a context, and thus require a different instruction (BinOpContext). This was
already handled by the traditional binop() of the isel, but not by the binop
expression that can be in a cjump. Centralize the code by calling a common
binop helper from isel binop as well as cjump.

Change-Id: I793ee3eebe56db4c86d5399a783a84be3093fd35
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
test: Adapt to Qt.platform.os rename ("mac" -> "osx")

Marking this test as QSKIP and also updating the JIRA task

Task-number: QTBUG-32650
Change-Id: I9e98024bf50c43f96269c39d779803ae9c46168d
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Document parenting behaviour of delegates in QML ListView and Component.

ListView:
As delegates are instantiated in ListView, they are parented to views
contentItem. This is now explicitly stated in the documentation.

Component:
Components are not derived from Items, so they cannot hook to anchors.

Task-number: QTBUG-24822
Change-Id: I09e04fbcc01b2858c039d22f9600ef201a9a91ab
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Get rid of unused outer function pointer of QV4::Function

Change-Id: I3ea88d3c259447081d1ac5f85d7da95fed8f02f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Introduce QSGMaterial::CustomCompileStep

Nobody reimplements the virtual QSGMaterialShader::compile()
function, so we disable that code path and make it opt-in for
compatibility.

We do this, because opens up for that the renderer can do something
different, including changing the source code to allow for better
optimization.

Change-Id: Ia72f9eda7d6428e26878158ab03349f753a35c66
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Support opt-in QSGNode descriptions without breaking binary compat.

This define is quite useful for debugging scene graph internals, but
it is disabled by default to conserve memory.

For clarity, I renamed the define to QSG_RUNTIME_DESCRIPTION.

Change-Id: Ie5ff44d67af38adc65d0d09255d8533dc7a33bff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ibb584a2d7975996cd26514b82d1da2d447fcbebf
Improve reliability of tst_qqmlcomponent::onDestructionLookup auto test on Windows

The test relies on exact garbage collection, which we can't offer anymore.
But we can use the same tricks as in qqmlecmascript to improve the changes
of a successful collect significantly.

Change-Id: I7b3d7eca7a9bdb551a01a5a3da80549196c45f23
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Add reference counting to the VM functions

This reduces memory pressure, keep engine->functions small and thus makes back
trace lookup faster. It became visible for example in the QtQuickControls
auto-tests that use plenty of loaders and we ended up with 30k+ functions.

Change-Id: Iaa5981f44e1e49ad9417a50c1e6a74946090dd28
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Export V4::PersistentValuePrivate

Indirectly required by QtLocation and its use of QJSValuePrivate

Change-Id: Iea5bca47af8195e344d17fe2b82118141656d997
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev