iOS: Update QIOSScreen::nativeOrientation() for iOS8

For iOS8 and up [UIScreen bounds] changes based on the interface orientation,
so we need to use [UIScreen nativeBounds] instead.

Change-Id: I3fc12cfa417df26ca94c803e970bc2dc18a94378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Fix endianness part of QSysInfo::buildAbi() string

Both Q_LITTLE_ENDIAN and Q_BIG_ENDIAN macros are always defined
on all architectures. So, byte order detection results in
"little_endian" value for big endian systems. Test the system
endianness in a right way, according to Q_BYTE_ORDER macro
documentation.

Change-Id: I5523f90567e78d679a3ff2902a8f5377ed39ceb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QCommonStyle: replace a QPolygon with a QPoint[] (I)

No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

Change-Id: I50c69103bba47e9f6de4f5616e8f40fee522ddc2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QCommonStyle: replace a QPolygon with a QPoint[] (II)

No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

Change-Id: Ifdf8224ddffe06ef7848562023e372e2c32b9ad6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QCommonStyle: replace a QPolygon with a QPoint[] (III)

No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

Change-Id: Ie1eecd376a52b73572998ba253a032deaa0daaf9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QCommonStyle: replace a QPolygon with a QPoint[] (IV)

No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.

This one is a bit more complicated, as the QPolygon was returned
from a helper function, so I wrapped the array in a minimal
std::array-like StaticPolygonF.

Together, these four QPolygon -> QPoint[] changes result in
ca. 4.5K text size reduction for libQtWidgets.

Change-Id: I082f199d5edb7a7782173fe3748220f373edac8a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Doc: QRect::isEmpty's documentation didn't match the code.

The code says
bool QRect::isValid() const { return x1 <= x2 && y1 <= y2; }
so the documentation should say <= as well, rather than <.

Change-Id: If52005879d2a758b5d1d64b552e6cd96341fae76
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
windows: Enable ANGLE D3D11 renderer by default

Also, remove the -angle-d3d11 configure option, as it no longer is
necessary to select the renderer at build time.

The D3D11 renderer is the default renderer in upstream ANGLE, and has
been shown to be a more reliable solution for developers running over
remote desktop and inside virtual machines. It also provides more features
to the OpenGL ES implementation.

This configuration switch does not disable the D3D9 render; if the GPU
does not support D3D11, D3D9 is used instead.

[ChangeLog][QtGui][Windows] The ANGLE D3D11 renderer was enabled by
default. Systems which cannot use the new renderer will automatically fall
back to the D3D9 renderer at runtime.

Task-number: QTBUG-41031
Change-Id: If894309c07d9309c236b63c36f37679f74375133
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Windows styles: Add device pixel scaling for system metrics.

Metrics obtained from the system must be scaled down
when device pixel ration scaling is in effect. Factor out
functions to return the device pixel values which might still
be used for drawing.

Task-number: QTBUG-38993
Task-number: QTBUG-38858
Change-Id: I6b90629e4979436bbb46f8c1fa1ee2253ada7ece
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Windows styles: Scale hardcoded-values according to DPI.

Factor out functions to return the fixed values and scale those.

Task-number: QTBUG-38993
Task-number: QTBUG-38858
Change-Id: I59c70a206eae76bf08bc2aeb5cda5a740cd3d6dc
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
ssl: enable non-OpenSSL backends to compile QSslSocket tests

Some of the QSslSocket tests use OpenSSL-specific symbols. This
change fixes this issue.

Change-Id: Ib67efa42a15facaf0ad34fc0466341a37d945d1e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
ssl: make peerVerifyError test agnostic of error order

Currently the peerVerifyError test for QSslSocket makes an assumption
about the order in which SSL errors are emitted by peerVerifyError. This
assumption does not necessarily hold for non-OpenSSL backends.

This change fixes this assumption, and also checks that HostNameMismatch
was found both in the errors emitted by peerVerifyError and by sslErrors.

Change-Id: I856d1ea43b36332db0f178d35fc14a4bb18ad673
Reviewed-by: Richard J. Moore <rich@kde.org>
GraphicsView: Fix resolvePalette() for QGraphicsItem's children

Use a proper function for that.

Change-Id: I166ce44b8987d522cb01bae57009b2b862851b92
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Android: don't recreate surface on shutdown

When we suspend the app, we destroy the surface to save resources.
We don't want to create it again just as we are shutting down.

Task-number: QTBUG-41072
Change-Id: I7a616249bee869b92716d0911201a80d73c2f8da
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Avoid deadlock when suspending device

Don't wait for the GUI thread when it's already waiting for us.

An application that uses the virtual keyboard may get an inputmethod
query just when it is being suspended. If the GUI thread is already
blocking on a semaphore at that point, waiting for the android thread,
we really do not want to wait for the GUI thread...

Task-number: QTBUG-40955
Change-Id: Iea2cf0dd058a41a897d596c4bcf16f0508adb20b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
qdoc: Highlight selected section / entry in the documentation

This commit adds id tags with the anchor reference as the value
to html entities for documentation section titles and function
signatures, properties etc. for both C++ and QML documentation
pages.

Together with new CSS rules, we can dynamically highlight the
title that the user clicked on. This helps to locate the item
of interest on a crowded page or when the page cannot be
scrolled down enough to place the selected item on top.

Change-Id: I7d1db2ed4e12779e1a9e571996ee65c3befa4e7a
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
ssl: common certificate parser support for extensions

This makes non-OpenSSL backends able to handle to certificate
extensions.

This also converts the Q_OS_WINRT #ifdef's in the unit test to
QT_NO_OPENSSL as the behavior is the same for any non-OpenSSL
backend.

Change-Id: I6a8306dc5c97a659ec96063d5a59cee2ee9a63a9
Reviewed-by: Richard J. Moore <rich@kde.org>
Windows: Move dock windows automatically when screen is disconnected.

Windows does not automatically move WS_EX_TOOLWINDOW type windows.

Task-number: QTBUG-39320
Change-Id: If9804f32beb534a27ba649abf5eaceb686af8f50
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
xcb: fix coordinates of touch points

Fix conversion from FP1616 to qreal.
Use 16-bit mask 0xFFFF instead of 8-bit mask 0xFF.

Change-Id: I0ee39b2e298b7ff7d7a67981925374d6a18f1474
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Bump version of QWidget geometry serialization to 2.0

It was decided not to port the handling of the saved
screen size to Qt 4.8, so, bump the major version to
ensure Qt 4.8 bails out.

Task-number: QTBUG-38858
Change-Id: Ia870519553172cd383830d9a722b0fada180ee1b
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>