Remove static initialization of QObjects

Statically initializing QObjects will cause e.g. the main
thread pointer in QCoreApplication to be set when the library
is loading. On Android, this is never the real main thread.
The effect was a warning about QApplication not being initialized
on main thread, and a race condition which sometimes caused
apps to hang on startup.

[ChangeLog][Android] Fixed possible hang on startup for Qt Quick
applications.

Task-number: QTBUG-36426
Change-Id: I7bd8a8f35ef1a2548949978563e3157f8dc854c7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I5ac68cc3ad3926190817f0d3d5b4526e70badff6
Expose Qt Quick gradient conversion code privately.

Rectangle is currently the only item that supports gradients, but other
items have been introduced (within Qt Quick Enterprise Controls) which
need QQuickGradient => QLinearGradient conversion, and it doesn't make
sense to duplicate the gradient stop conversion code.

The QQuickGradient and QQuickGradientStop classes need to be privately
exported so that modules that use private Qt API can use the classes
with quick-private.

Change-Id: I8b130ff5384d9481d3f29510b3de61f7d8f775e2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Doc: Added information about classname in qmldir

QML modules that depend on C++ plugins must provide
the plugin class name information in their qmldir
to support statically built Qt Quick applications.

Task-number: QTBUG-35369
Change-Id: I15432fec4f8a72be4f851da061ac0c091696d8c9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Fix wrong calculation of viewPort for transitions

Viewport is calculated wrong for horizontal layout in a second instance

Task-number: QTBUG-29944
Task-Number: QTBUG-31546
Change-Id: I136ae4484278d14f796613505e3f38c65ec51ebe
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Florian Hänel <florian.haenel@basyskom.com>
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Disable Flickable tests on Mac OS X.

Task-number: QTBUG-36804
Change-Id: I6bff9360d785bd7496131e3b56a24b11871257fe
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Enable program binary support through QSGRenderContext API.

Change-Id: I4eecff3c8a2c727d38d394305d248eddeef87e8e
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Provide scenegraph backend API for marking scenegraph nodes dirty.

Prior to Qt 5.2 tracking of dirty state was automatically handled by
QSGNode. With Qt 5.2 this approach has changed. Moving forward render
state is ideally tracked outside of QSGNode; however, we continue to
provide a way to track it in the node itself, to support custom renderers
and the default node updater.

Change-Id: I78907caee1b64b94a2bae2d8b577210f1955a431
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Update scenegraph docs to be in line with Qt 5.2 behavior changes.

Change-Id: Id21386e6dc85bb7e109d9bd03e80f306c0a99733
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Ensure m_opacityChange is cleared at the beginning of each frame.

Change-Id: Ic5eb5e1955e09884f98975a8ac74b42f00e233d7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Fix crash when the currently running binding is deleted.

Stop capturing properties once the expression is deleted. The
following example triggers invalid read/write memcheck errors
when trying to capture propFromParentScope:

Item {
    property real testProp: {
        if (x == 0) testProp = 7
        return propFromParentScope
    }
}

Which can eventually lead to a crash.

Task-number: QTBUG-36798
Change-Id: I233de2c81498884df0563e8ce155752845aafcfb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix spurious binding loop errors in QtQuick Controls and other places

Commit 5dc7649f5ad7dca6e13707e827d001c3f118a6ef caused this regression,
as a result of lazy binding evaluation and self-referencing objects:

    import QtQml 2.0
    QtObject {
        property QtObject objectRef : subObject
        property QtObject blah: QtObject {
            id: subObject
            property int value: 42
            property int blah: objectRef.value
        }
    }

When blah is evaluated, we now lazily initialize objectRef - as opposed to
previously throwing an exception and then when objectRef gets initialized we
re-evaluate blah due to its dependency. So while evaluating "objectRef.value"
for blah, we initialize objectRef by evaluating "subObject", and after doing
that we write the "objectRef" property. That triggers a change notification,
and since the objectRef reference for blah is a compile-time known dependency,
the change notification triggers a re-evaluation of "blah", which is the
binding loop.

What's wrong here is that we register the pre-defined captures before the
code execution, when we should register them after the evaluation, or strictly
speaking after flushing pending bindings, like it is the case for individual
properties in bindings where we could not pre-determine the depenencies.

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

Conflicts:
	src/qml/jsruntime/qv4functionobject.cpp
	src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h

Change-Id: Id164f6c3b45501aa466908659ec4e3b957323753
[new compiler] Fix error reporting null object group property access

The new code path reported line and column, the latter was missing from the old
code path and is easily added.

Change-Id: I730e56f0fe4e99091dfb10e5f601faf1d3b8949c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
[new compiler] Report errors at type compile time for invalid group property access

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