Windows: Fix call of ToUnicode

ToUnicode sometimes gives wrong results if it is used with a
keyboard buffer containing the ctrl modifier. Special cases
containing alt and control might trigger the third assignment
of a key, but if no alt modifier is used for the key event,
we temporarily disable the control modifier in order to obtain
the character with ToUnicode.

Task-number: QTBUG-35734
Change-Id: Ifd88c640541b42fa65ee1dc9b55af3386714b0b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
xcb: Fix logic for minimized state

_NET_WM_STATE message can be received by a window in the minimized state.
Don't change the window state in this case.

Task-number: QTBUG-31117
Task-number: QTBUG-39376
Task-number: QTBUG-34430
Change-Id: Ic77a345e442891972b692803fab1e2f6aef30433
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Do not use Q_COMPILER_CLASS_ENUM for gcc 4.4

It breaks the compiler self-test:

tst_compiler.cpp:754: error: no matching function for call to ‘qCompare(tst_Compiler::cxx11_class_enum()::X&, tst_Compiler::cxx11_class_enum()::X, const char [2], const char [13], const char [17], int)’

We not should assume it is safe to use, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37946.

Change-Id: I72c9c56e3e4f62bdfdfa133b6b0a2e610b5331c8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
cocoa: override new QPlatformMenu::popup() function

Having two versions of popup, one that takes a point and one that
takes a target rect, causes problems for client code if they use
the 'target rect' version since not all platforms override that
function.

So this patch will change the remaining platform that override
QPlatformmenu into using the new 'target rect' version.
Calling the old version that takes a point will still work, since
the base version will then convert the point into a zero-sized rect, and
forward the call to the 'target rect' version instead.

Change-Id: Icc8531d79270a4f24ec08b8ed95b18ed3db1ad4d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
remove unused member VCFilter::CustomBuild

Change-Id: I2b57f0ac020ad1b85ffeb76a214b9cf2f48cb6d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
introduce VCFilter::findFile

Move common code into a function
and exit early from simple search loop.

Change-Id: I88d1227653e28badc213fbe4ebe1e2a19f6e5793
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
vcxproj: fix custom build steps in different build variants

There's a comment in VCXProjectWriter::outputFileConfigs that
states: "We need to check if the file has any custom build step.
If there is one then it has to be included with 'CustomBuild
Include'".
This patch adds the code to the comment...

Task-number: QTBUG-30373
Change-Id: Ibfef3c80630e08c743bfadce299a8b6a0c58411f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
ANGLE: Upgrade to 2.1~abce76206141

Upgrade to address issues discovered since the last upgrade.

Patch notes:
0000-General-fixes-for-ANGLE-2.1.patch
  added removal of the unused third-party tracing functions

0003-Fix-compilation-with-MinGW-gcc-64-bit.patch
  removed as it is no longer needed

0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch
  removed as it is no longer needed

0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch
  now supports MinGW 64-bit

[ChangeLog][Third-party libraries] ANGLE updated to 2.1~f8602ad91e4f

Task-number: QTBUG-40649
Task-number: QTBUG-40658
Task-number: QTBUG-41031
Task-number: QTBUG-41081
Task-number: QTBUG-41308
Task-number: QTBUG-41563
Change-Id: I9f776c8d5cb94ddb12d608a8d5630bfc54437bea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Revert "winrt: Remove depth/stencil from the default window format"

This reverts commit 636d2e340206664a5885656c06e1ae9eb032d446.

The issue was caused by a bug in ANGLE, not a lack of hardware support.

Change-Id: If2a66cd023dc7f2329dc2812169042487eecd428
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Update the detection of when to log to stderr

On Windows, the detection changes only by inserting the use of the
environment variable before the existing tests and removing the check on
stderr.

This commit adds logic similar to Windows's: if the application has a
controlling TTY, we'll use stderr. Otherwise, we'll use the system log.
This is technically a change in behavior: previously, we would always
use the system log, unless the environment variable told us not to.

In practice, the behavior doesn't really change: Android and BlackBerry
and systemd-spawned applications are launched with no controlling TTY,
so logging will go to their logging systems.

[ChangeLog][Important behavior changes][Logging (including qDebug and
qWarning)] Log output will now go to the system log (if support for it
was compiled into Qt) if the application has no controlling terminal or
console window. Set QT_LOGGING_TO_CONSOLE to 1 to force logging to go to
stderr.

Task-number: QTCREATORBUG-12564
Change-Id: I043c5c4f47c15f26d4f4a5cf43df466ea38cdbc7
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Fix build when using -Werror

"accessible/qaccessible.cpp:2154:43: error: 'type' may be used uninitialized in this function [-Werror=maybe-uninitialized]"
Compiler doesn't seem very smart, all enumerators are handled in the switch already.

Observed on android's gcc and gcc-4.7 on GNU/Linux

Change-Id: I30b4660c18992158457cada01b5916aa4feae4ff
Reviewed-by: BogDan Vatra <bogdan@kde.org>
xcb: Fix detecting the fullscreen state from _NET_WM_STATE flags

A fullscreen window can have maximized flags being set so first check
the NetWmStateFullScreen flag.

Change-Id: Ia802abf3cfa4c784baa2d55088e3f53310f0362e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Make QRegion::shared_empty const

Continuing the trend of QString, QVector, etc.

Change-Id: I8f53d4abfa0dd941bfdfd3c1a9049a42dbf92691
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
uic: Add QOpenGLWidget.

Change-Id: I02cb6bd4a038b865fa414fa557b12e369685248f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Fix losing dirty state when calling update() from paintGL()

When the paint for the QOpenGLWidget was in invoked on the
fast path, where only that widget was dirty, the resetWidget
call after sending the paint event removed the widget from the
dirty list, making it impossible to schedule an update during the
event handling. The correct way is to clean the list and then send
the paint events.

Change-Id: Icdad5686ded7944fd1c8af56496f725e163a60e6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Make qopenglwidget example functional without timers too

Change-Id: I6a89eaf794202c45a5ad3152d304e46041704730
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Handle PPK_CustomBase in QWin32PrintEngine::property

If we leave out the default so that the compiler catches missing enum
values we should actually handle them all ...

Change-Id: Ieb4992dec84ce847e48ab3c4a94bd8825a148706
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
QSql changes for Qt 5.4.0 changelog

Change-Id: I3b2b7b6bbe1089e51f71b5873d004b8f20f41d33
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Additional support for devicePixelRatio in CE_MenuItem’s icon painting

FusionStyle and MacStyle have this already, the change just brings it to the others.

Task-number: QTBUG-40277
Change-Id: I08dc80771b9cd0ab47179e1994ab6510b022eade
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
QMdiArea: Fix positioning of cascaded sub windows.

Take PM_FocusFrameVMargin into account.

Task-number: QTBUG-35146
Change-Id: I1499790537ddf9fbb912ab764b7d049ee11af95d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>