Revert 99480d5420c0beea6771be582c039b550a4461f5

The Mac OS X platform plugin has been fixed so that this
hack is no longer needed. Not to mention that it breaks on XCB.

We keep the warning about bad exposes from the plugin in debug
mode. These are still useful for tracking down future bugs.

Task-number: QTBUG-35143
Change-Id: I5125f7ae2b7fd77c55e9a29b10aa5434598a9ea9
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Add support pre-compiled bindings for QML custom parsers

For example the x property in

    PropertyChanges {
        target: foo
        x: someItem.x - other.width / 2
    }

was compiled at run-time dynamically, which produces slower code (no type
information available) and slows down the type instantiation, because the
compilation happens every time at instantiation time (or later).

With this change, when the custom parser behind PropertyChanges requests a
binding ID for "x", the right hand side will be added to the bindings to
compile, then compiled and later at run-time the QQmlBinding constructor that
takes a QQmlBinding::Identifier can retrieve the correct compiled function from
the QV4::CompiledData::CompilationUnit.

Change-Id: I857fb2d39e82714b225bc9394b9904b795c6662b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
When the MouseArea loses grab, an active drag should be cancelled.

Change-Id: Icc784dd3265c211d9b077b692464591a41976354
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Set all attached section properties before emitting change signals.

If we have bindings to the section properties, e.g. implementing manual
section header creation, we want previousSection, section and
nextSection to be set before emitting the change signals to prevent
different results each time the binding is run.

Change-Id: Id3a0b4a53419681f35102c9e7c620b5c6112ebb0
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Ensure that QML Windows respect the default platform window state

The 'visible' property of a Window would be set on the baseclass QWindow
like any other property during QML component creation, which would cause
create() to be called and the platform window would be created.

This left the 'visibility' of the QML window as Windowed, not respecting
the platform defaults for how windows should be shown. The user would
have to explicitly set "visibility: Window.AutomaticVisibility" for
this default to apply, which doesn't make sense -- it should be the
default.

We solve this by deferring setVisible and setVisibility on the window
until the component is complete and we have a full picture of its state.
We then ask the platform for the default state based on the window flags
(ensuring that eg "flags: Qt.Popup" will not result in maximized
windows on iOS and Android), and apply the deferred visibility.

The deferred visibility may still be 'false', but setting the window
state makes sense anyways, so that a later "visible = true" will
apply the default window state.

Deferring platform window creation until the geometry has been
potentially set from user code also has the benefit that the
platform window can check the geometry and apply a default
geometry if it's null. This was not possible when the 'visible'
property was a regular property, as you could not know if the
user's geometry changes would come after platform window creation.

Task-number: QTBUG-35174
Change-Id: Icf3236187992048a85b2196c059f9b54699041a4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
disable qml import scan for qmljs

there is nothing to scan here.

Task-number: QTBUG-35160
Change-Id: I47223a295eafe67f0f2dd85a12444260f88d0623
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Handle boundingboxes with NaN in them.

NaN does not compare well with other floats. The result is that the
bounding box is left at its initial values, FLT_MAX for top-left and
FLT_MIN for bottom-right. If so, treat geometry as invalid, aka
infinite.

Task-number: QTBUG-35192
Change-Id: I1df6987d56a0ce1f500b0eba344a5dcbc55f80a4
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Doc: Update examples used in Writing QML Extensions tutorial

Update the examples to use Qt's resource file system to
store the qml files in, enabling them to run unmodified
in any platform/build configuration.

Also,
    - Chapter 6: Move the plugin code to a subproject
      and create a C++ application to use the plugin
    - Update documentation related to above chapter
    - Add thumbnails for the examples so they will
      appear in Qt Creators example list.

Task-number: QTBUG-35001
Change-Id: I29122af11bb11c7e5e17993438e5fc18c7f96f89
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Doc: Change the order of QQuickText function definitions

For Text QML type, some property and method documentation
is missing from the output because in the source file,
they appear before the '\qmltype Text' command.

This change reorders the functions so that qdoc will see
all documentation for Text QML type.

Task-number: QTBUG-35018
Change-Id: Icd995f66679d5105912ee12a7aeffd510921a54d
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Update changelog for 5.2.0

Includes taking entries for 5.1.2, which is no longer a general bugfix
release.

Change-Id: I33b4c06aa83d6344a2f14b4147eaf7056c3bacb9
Reviewed-by: Sergio Ahumada <sahumada@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix QQuickTextInput not overriding shortcuts (del/home...)

[ChangeLog][QtQuick] QQuickTextInput would not accept
delete/home/backspace/left/right keys when the key was used in a
shortcut.

Task-number: QTBUG-34517

Change-Id: I553af8247191ecdadcb4677e9fc85848270a95d3
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Allow QtQml to compile with ICC 14.0 with -Werror

Third-party source contains a static variable that is only used in
debugging code (an ASSERT).

cached-powers.cc(134): warning #2415: variable "double_conversion::kCachedPowersLength" of static storage duration was declared but never referenced
  static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);

Change-Id: I97ea9ada8f03d9fd45149fbc4bfdf61877498339
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix change-of-sign warning in the new QML compiler

The m_line and m_column members are of type quint16, so -1 is not
valid. BTW, aren't 65535 possible lines too few?

qqmlboundsignal.cpp(92): error #68: integer conversion resulted in a change of sign

Change-Id: I2f73c276c5fc9b6988b5fa4274f7fa3f6bb85c4b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Add a namespace for a global variable in a public header

The "Qml" prefix should suffice.

This was found by ICC 14.0 in a bogus warning:
qqml.h(470): error #2415: variable "CurrentSingletonTypeRegistrationVersion" of static storage duration was declared but never referenced

Change-Id: I604cd712529b1c4553457c1ea0904182ac4a9e80
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Safely abort when we don't succeed in creating a GL context.

Task-number: QTBUG-33363
(cherry-picked from commit 12eab9162781)

Change-Id: Ia2b0c329157786cb4ec703989f12d2fdb1ce6bc8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
V4: remove invalid assert.

Both the base and the index of a subscript can (and are allowed to) be
other things than temporaries.

Change-Id: If073e262712bab488f18eac5ebe097be99c40359
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 IR: change the worklist to a QSet for block scheduling.

Fixes a crash in octane.

Change-Id: Ib72ac0b7a2941230a87543f30fcf7e55d7094886
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
V4 IR: remove common toInt32 casts.

E.g.:
	a | 0
	b & 0xffffffff

These operations force the operands to be converted to int32 without
changing their value. At this point we already added convert calls to
the IR, so we can safely get rid of these operations.

Change-Id: Ic4d3b989e13439eccd2c878fa7bf5030acae7630
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix build in release mode with forced asserts

Change-Id: I0e35533af7f65200a8bc3c4024c29344fa6f4b7a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix style animations to stop when the item is hidden

QStyleAnimation automatically stopped for hidden QWidgets, but didn't
know anything about QQuickItems and kept animating regardless of their
visibility. QStyleAnimation was changed so that it will keep animating
only as long as the animation target accepts animation updates. This
change ensures that the style animation updates are accepted only when
the item is visible.

Task-number: QTBUG-35319
Change-Id: I3c93a653316b8abbbc32940cd7499b660828eff8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>