Use configure -confirm-license option also in commercial Qt versions

Pass the -confirm-license option to external license checker which is
used in Qt commercial version.

Change-Id: I62326d1e6a8307dae64535ecf2ced762130b7e8f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Fix unused variable warning

> qstring.cpp:5325:1: warning: 'defaultCollator' defined
> but not used [-Wunused-variable]

Change-Id: I29fe2006a678f4f0b3b504b90120c0e99d7090fb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
WinRT winmain: Pass ImagePath as part of ImageParams in Xap packages

ImageParams is used to pass arguments to main(), but when used the
original argv[0] is dropped. To remedy this, expect argv[1] to contain
the same value found in the Xap's ImagePath.

Change-Id: I2fb3b9956304fdcdeec4424ea56289d56ad4fe0b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Fix offset calculation on WinRT

According to MSDN "the offset must be a multiple of the allocation
granularity". We use this already for the win32 version by splitting
into offsetLo and offsetHi. However, we did not convert it back to the
correct argument passed for MapViewOfFileFromApp.

Now all auto-tests for mapping succeed.

Task-number: QTBUG-37773
Change-Id: I7e43f906cb93164b58f4e5e3f88388cdace865d7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Use an offscreen surface in VAO cleanup

Avoid failing the makeCurrent() on iOS that does not currently support
using a window with different contexts.

Change-Id: I2e10ad7e382161625a78518d02ad94edaff591ca
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
When looking up the window hierarchy, stop at foreign windows

If the window being activated is an embedded window, the parent window
will be a foreign window (usually not even belonging to the current
process); we shouldn't attempt to focus it.

Task-number: QTBUG-37984
Change-Id: I2ea03a86b30bbc43cde643e18e0e1d020e5f2c84
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Do not set fwdcompat bit for a compatibility profile QGLFormat

AMD drivers do weird things. Provide a workaround.

Task-number: QTBUG-37909
Change-Id: Idabd6ebb6e1447cb9bd92c7711a50aaa8575b9d6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Windows CE: Fix message about freetype font rendering.

Task-number: QTBUG-37976

Change-Id: Ib4bf6ba8f62e2dc4f3860313442fa57c67f06d9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Remove docs for javascript core jit configurability

This should've been removed in commit 24f10256631cd1e0f461430a50be36b74f19e01e

Task-number: QTBUG-37832

Change-Id: I3404f17c904dbb462773f40371d09b0e58a0930d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
QNX: Fix OpenGL autotest

On QNX grabbing the frame buffer returns the content of the back buffer.
In order to execute the OpenGL tests properly a swapBuffers is executed before
in order to be able to retrieve the content of the front buffer.

The patch also documents this platform behavior.

Change-Id: I7a501818ec6eea061f2f54f95854f68cb72e0534
Reviewed-by: James McDonnell <jmcdonnell@qnx.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Re-add missing test to kernel.pro

Patch 9a08483d763dacfca6029f7a8970846e83df0e2a introduced a regression,
tst_qmetatype test was not meant to be removed.

Change-Id: I5456ffbbd9d9f8e461f828c6183e46dabf67952b
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[xcb] Fix build failure

Build failure was introduced by 9bb634a6176c639bd6b52d58151e9927c30919d0.

When linking with systems provided libxkbcommon, then DFLT_XKB_CONFIG_ROOT
can't be accessed directly.

The reason that this slip through CI is that on CI machines Qt
is build with bundled version of libxkbcommon.

In addition this patch improves keymap error message, by making it more explicit for
users what could be the reasons for "keymap compilation" failures and what should
be done to make input work. As it turns out this is a common issue on old systems,
servers and some VNC clients.

Task-number: QTBUG-37971

Change-Id: I77667a404150ee7ab8465a065e23ca5eea63c33b
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Enable the depth and stencil buffers by default in QOpenGLWidget

QGLWidget rendered to the default framebuffer, which had a depth and
stencil buffer attached by default.

Keep this behavior by adding the attachments to the FBO by default
in QOpenGLWidget.

Change-Id: I6f72a444eac3d8eabb7a539ad12216f1e5d2183d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Add a way to share context between QtQuick and QtWidgets

This will replace QSGContext::setSharedOpenGLContext.

To be able to allow sharing the Chromium GL context with both
QWebEngineView and QQuickWebEngineView, we need some way of setting
the sharing within QtWidgets and QtQuick. Since they don't depend
on one another this patch allows the sharing context to be set
through QtGui.

Change-Id: I91b365dd06ec925b4c5a99ac82c222778781fe8e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Avoid an "OpenGL Error: 1282" output when resizing a QOpenGLWidget

When we delete the previous FBO in QOpenGLWidget::resizeEvent while
it is the currently bound FBO, the QOpenGLContextPrivate::current_fbo
will not be updated and will try to be bound during the initialization
of the new FBO.

Fix the issue by explicitly releasing the FBO on destruction if it
is current.

Change-Id: Id049889c4857526750bbecf3dd27343e44449c12
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Android: Stop ART from complaining about missing thread names.

The new Android jvm (ART) complains loudly if we attach without
supplying a thread name.

Task-number: QTBUG-35441

Change-Id: I962d613be0db50f3ca9a4c786b36003f31c9db14
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Android: Don't accept the volume-key events.

On Android the volume keys are by default connected to the global volume
control and by accepting them we remove this feature. Meaning each
application would need to re-implement this functionality.
Ideally we should only accept the volume keys if they where accepted by
the user to avoid overriding default behavior, but we currently don't
have the infrastructure to do that.

To revert back to the old behavior the env. variable
QT_ANDROID_VOLUME_KEYS can be set.

Task-number: QTBUG-36570

Change-Id: Ib053a40383f2de452f385b19f7795c2fc23fc4fe
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Enable s390[x] detection.

It has been working in Debian for some time.

Change-Id: Ib5741a4ba68bf95c7020336c84bc66257ff27809
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix access of tmpStorage in QODBCResult::exec().

Instead of using a list and appending / popping of elements, use
a vector of constant size and access via index to avoid
bookkeeping errors.

Task-number: QTBUG-37831

Change-Id: Icb5a182626c63e693b04daaf7a2f70997d9aeae1
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Be less verbose about invalid keysyms

Report invalid keysyms only when DEBUG_GENERATOR is defined.

It is not unusal that Qt applications are used on old linux
distributions where Compose files might be far behind the current
development, therefore we should be less verbose when encountering
invalid keysyms. On Red Hat 5 compose key plugin reports ~3200 lines of
warning messages:

"Qt Warning - invalid keysym: U1001D1BC"
"Qt Warning - invalid keysym: U1001D16F"
"Qt Warning - invalid keysym: U1001D1BA"
"Qt Warning - invalid keysym: U1001D165"
"Qt Warning - invalid keysym: U1001D16F"
...

Task-number: QTBUG-34483

Change-Id: If0c51d300508ef164ad7fc59b0a76a838cd5a3b9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>