Allow platform to decide default behavior for show() based on window flags

The ShowIsMaximized and ShowIsFullscreen style hints were not granular
enough to build a default behavior from that would be correct for all
platforms. The recent Android patch that excluded dialogs from being
shown maximized (Ia249e93dbbea1) has now been moved into a platform
override in the Android integration plugin, leaving other platforms
to the default behavior of using the style-hints. We still special
case popup-windows though, as that behavior has been there for a
while.

Task-number: QTBUG-34969
Change-Id: Id36346d71bfc46171383ffe334592ca0b94e456f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Workaround source compatibility issue introduced by xcb 1.9.3

Previous version of the struct:

typedef struct {
    uint8_t  response_type;  /**< Type of the response */
    uint8_t  pad0;           /**< Padding */
    uint16_t sequence;       /**< Sequence number */
    uint32_t length;
    uint16_t event_type;
    uint16_t pad1;
    uint32_t pad[5];         /**< Padding */
    uint32_t full_sequence;  /**< full sequence */
} xcb_ge_event_t;

New version of it:

typedef struct xcb_ge_event_t {
    uint8_t  response_type; /**<  */
    uint8_t  extension; /**<  */
    uint16_t sequence; /**<  */
    uint32_t length; /**<  */
    uint16_t event_type; /**<  */
    uint8_t  pad0[22]; /**<  */
    uint32_t full_sequence; /**<  */
} xcb_ge_event_t;

Changes are:
- "pad0" became "extension"
- "pad1" and "pad" became "pad0"

More details in https://bugs.freedesktop.org/show_bug.cgi?id=71502

Task-number: QTBUG-34748
Change-Id: Ibd801c11510f75fa82d5c14346b95236142487ac
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Stabilize tst_QGraphicsScene::isActive().

Position windows, use QTRY_VERIFY.

Change-Id: I84349dd696a633840973e9db0c538830aaa96948
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Stabilize tst_QGraphicsView::hoverLeave().

Position windows, use QTRY_VERIFY.

Change-Id: I0fab91c65b30e7028343c7e9b19a1b232fe72ebf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Stabilize tst_QGraphicsWidget::updateFocusChainWhenChildDie().

Position windows, use QTRY_VERIFY.

Change-Id: I185bcd91bcdffbc0460a4d24f685d3dde84338a7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
BlackBerry: Fixed root window size

On BlackBerry the first window shown is treated as root window and
should be displayed full screen. The geometry has to be adjusted
properly to achieve this.

Task-number: QTBUG-34930
Change-Id: I6c011620116cc463e16dd352521b2b901a9f9f69
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
QNX: Fix build

Return "qnx" on non-BB10 QNX.

Task-number: QTBUG-34980
Change-Id: I80a95f8d4945fb180fdd565147cf344b51d79fda
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Fix crash regression for ApplicationWindow on Mac

This fixes a recent regression following the integration of
change:

7cc1656fef21e6bdc044968a79f0a41155357c29
(Make sure menu bar has a parent window ...)

As it now consistently crashes on mac in several of the
Qt Quick Controls examples, it is critical that it gets into
the release branch.

Change-Id: If3db1025229a7f7fd4e7ecc703d5f655db73964d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Don't send ApplicationStateChanged, if platformIntegration is not set.

Task-number: QTBUG-34868

Change-Id: Ia86877550884a3037b9ddedf5d8e227ec1ead2d6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Add list of C++11 features supported by MSVC 2013

Task-number: QTBUG-34705

Change-Id: I22caecdf30c417d323fbc80e7a1fd66e4253cec4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Fix compilation with MSVC2013 & C++11 support

See Variadic templates issue: https://connect.microsoft.com/VisualStudio/feedback/details/801828/c2143-error-when-compiling-c-code-with-variadic-templates

Task-number: QTBUG-34705

Change-Id: I733f1451f6d1e9b958c3a76998810fcff3fe779b
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
tst_QFileSystemModel: don't expect ~/Documents to exist

For me, this test failed because I don't have a Documents folder in my
home directory, even though that's what's returned from QStandardPaths
as the first DocumentsLocation.

Fix by falling back on the home directory if documentPaths.front()
does not exist.

Change-Id: I483f62f3b4b43d055c74774a7058a4aa420849b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix xkb.h compile warning on 32 bit systems

The message:

../../../3rdparty/xcb/include/xcb/xkb.h:118:5: error: this decimal
constant is unsigned only in ISO C90 [-Werror]

From the C89 standard:

"The type of an integer constant is the first of the corresponding
list in which its value can be represented. Unsuffixed decimal: int,
long int, unsigned long int;"

In the later standards "unsigned long int" is removed from the "Unsuffixed decimal"
list.

If integer constant is suffixed by the letter u or U, then the list is:
unsigned int, unsigned long int, ..

"unsigned long int" is sufficient on 32 bit systems to store the values of
XCB_XKB_CONTROL_PER_KEY_REPEAT and XCB_XKB_CONTROL_CONTROLS_ENABLED

Task-number: QTBUG-34142
Change-Id: Ic23781fcd00d4901ec9bb5a85068f4315c14bfb8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QTimeZone - Change Olsen ID to IANA ID

The name Olson was misspelled as Olsen in the public api of QTimeZone
which is needed to be fixed before first public release in 5.2 would
freeze the api and prevent it being fixed.  It has been decided that
renaming as IANA ID would be more future-proof.

Fixes to the private code will be done separately to keep this patch
against release branch to the minimum required.

Task-number: QTBUG-34735
Change-Id: I8ee90644862c907f6d1937b8536f0c02583ae736
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QTimeZone - Fix Windows Transitions with null rules

Fix the Windows handling of null DST rules for a given year, if the
calculation rules have a null value then can skip trying to loop through
the calculations until the min/max year is hit which causes the stress
test to time-out in CI, and instead return a value immediately.

Change-Id: Ie2d4ee55c5487e040e0cead91d1be2a0c06d3074
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTimeZone - Fix TZ file abbreviations

Fix parsing of TZ file abbreviations, to correctly return cases where
POSIX rule doesn't have separate DST rules, and where abbreviation
is a sub-string of another abbreviation, otherwise any toString() call
will crash.

Add test to exercise all available time zones, especially useful for TZ
file to confirm all file format variations dealt with.  Fix parsing of
Version 3 of TZ file, and ICU display name, to allow all files generated
from release 2013f to pass, otherwise isValid() call will crash.

Task-number: QTBUG-34061
Change-Id: Ie0b6abc218adff1c8967eb33fdb0762041d2305f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTimeZone - Fix dateForLocalTime() to check validity of next transition

The private method dateForLocalTime() was not checking that transitions
were valid, resulting in infinite looping when a time zone didn't have
any future transitions.

Change-Id: I0e5d07063861778dd86056a80c36fdd9f9d36133
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add QSysInfo::MacVersion enum values and parsing for iOS

Change-Id: I82e425e3cd06e0f515aa6edfb25ef9895956a5c6
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS: Use custom method to lay out windows instead of resizeMaximizedWindows()

Since we guard against overriding the geometry in setGeometry() when a window
has a window state, we need to use a custom method to lay out windows that
calls applyGeometry() instead.

Change-Id: I6508e6aac6746c024a6172f709b8339b35b40994
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Handle the Qt::FramelessWindowHint correctly in Cocoa

This fixes a regression introduced by
be405c86f8efac7c6bc8b749725d6d0e0499314d.

Task-number: QTBUG-34988
Change-Id: Id825b51d4d94826819d2405bb711886db3db8bc8
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>