Calling wglMakeCurrent on an already current context gives 100% cpu load

The problem occurs at least with nvidia cards when vsync is enabled
in the control panel.

Task-number: QTBUG-29686
Change-Id: I6fd2a3560a5baeeac7c3fe0440db85904c45026d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
An RTL submenu should be right-aligned

Task-number: QTBUG-30595
Change-Id: Iac54cae70b5a2ac6be5a750279fb390bb158776a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fusion & GTK styles need to check direction from style option not qapp

An RTL menu containing a menu item which opens a submenu was showing
the wrong arrow if the application's direction was not also RTL.
So now the test for QTBUG-30595 can be simplified: no need to set
the application direction, and therefore less chance of failure.

Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
QOpenGLPaintDevice: correct painting on retina.

Make QOpenGLPaintDevice::metric(PdmDevicePixelRatio)
return d->devicePixelRatio instead of 1.

Change-Id: I4cf9dd552a700b958212edc8efb990a45e77fd66
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Fix GroupBox painting on Windows when not using widgets

This is simply removing some slow and rather ugly hacks that tried
to reconstruct broken data from the windows xp theme. After testing
without these hacks on both XP and Windows 7, I believe we can
conclude that these workarounds are no longer required and even
breaks our look and feel in several places.

Task-number: QTBUG-29888
Change-Id: Ifaffd660e8d9ed6dfd43657745c3fa1606d33a7c
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Android: Don't crash when displaying multiple top-levels

While the raster platform plugin supports multiple top
level windows, this is not supported on the GL plugin,
so if you use GL or QtQuick2 in your app and use several
top levels, the app would crash with an error message.

A problem is that the top-level SurfaceView is a special
overlay View and does not support being stacked in a
layout. So instead, we let all windows share the same
GL surface and draw on top of each other. This works
fine for simple use cases.

We implement a new platform capability to make sure no
top level windows (even combobox popups and dialogs)
get non-fullscreen geometries. That has never
worked properly with the eglfs plugin.

Task-number: QTBUG-30473
Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Convert the new filename to native separators before checking it

If a native separator was put in the new name when renaming a file name
via the file dialog then it would correctly fail. But if a non-native
one was used on Windows then it would cause the file to be moved
instead if the directory existed.

Change-Id: If01760b8c54a69b600c9a44c7509017be70d33e3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Fix the QTouchEventSequence code snippet so that it compiles

The release() function also requires the QPoint to be set which was
missing from the code snippet.

Change-Id: I4a5cd2bed0915eb1fbaac3a34fb229eac9c284df
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Cocoa Menu: Remove unnecessary retain, release/retain in the right order

Also, make sure platform menu item is deleted on ActionRemoved event.

Change-Id: Ic07a81cb77833bdffd1464abf1c81ebdee4d16e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Mac: Fix various memory leaks

Change-Id: Id554be11ffcf9a506c217b0dc5b96cb37c4dd57c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Remove nativeResourceForWindow warning.

The warning is useful for pointing out the the return
value will be null. However, code that correctly
checks the return value (such as qt_macWindowIsTextured),
still causes the warning to be printed.

Change-Id: I3828992b3d5e7b08451cf0e051b937fa9d9536d3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
List the Qt5::WinMain Release configuration before the Debug one.

Apply the logic from commit d7ae34fdfde61838ce1e4fb13a945832841f61ab
(List the Release library before the Debug library in cmake files.,
2013-02-21) to the Qt5::WinMain library too.

Task-number: QTBUG-29186

Change-Id: Ie465fef1cc0fc842d86c5bc69ab84ec65ec652d9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Fix memory leak.

Change-Id: I7d308a869fdc729bd46ace336b71c7e30556d65d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Hide "invalid" accessibility interfaces.

Those with a null object pointer and those with a
null rect.

Change-Id: I40e0c435ee768fc8c58098fec131eb65e89d76f2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Compile with changes to the accessibility API.

Change-Id: I72e7636a02ad2fba984f4a96cbb33d441a7f8be7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Harden check for SDK platform name on Mac OS

We now use an absolute path, to prevent picking up the wrong plutil binary.
In addition we pipe the possible stderr output of plutil and xpath to the
null device, so that the final QMAKE_MAC_PLATFORM_NAME will be empty in
case of any errors, and caught by the isEmpty() check below.

Change-Id: I8ad24bf63162a76410c2ae223dd2fc48e7886bbf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Mac: Fix warnings about non-existing native Windows on startup.

Shown for example by Qt Designer.

Change-Id: Ia866a93a781a027aa3703f44314954888d75d436
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Fix format for alpha drawing.

Task-number: QTBUG-28531

Change-Id: Ie97953950cad26776724848adc5751c861903cf7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
SSL internals: fix memory corruption using QSslConfigurationPrivate

We are passing a QSslConfigurationPrivate that is allocated on the stack
(in QSslSocketBackendPrivate::initSslContext()) to
QSslConfiguration::QSslConfiguration(QSslConfigurationPrivate *dd).
When the SSL context is destroyed, this object is not there any more.
So now we create a deep copy of the configuration like we do in
QSslSocket::sslConfiguration().

Task-number: QTBUG-30648
Change-Id: Iaefaa9c00fd6bfb707eba5ac59e9508bf951f8a5
Reviewed-by: Richard J. Moore <rich@kde.org>
Actually set devicePixelRatio on copy.

Followup to 7b9d4531 - the second part refactors
to call setDevicePixelRatio but the call itself
was left out.

Change-Id: I3e36452603fe1d7d53fa1a74d87169efea1c2e78
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>