Fix for co-existence of QtDeclarative and QtQml

As a follow-up to commit 2f87fde9bb4bad6787101c0d135419b350b201a5, we also need
to change "hack" in the QGraphicsItem and QWidget destructor for early item
destruction to support the _qml1 variant of the QObject destroyed callback.

Task-number: QTBUG-35006

Change-Id: I65e37b1e9ddd8d14267aaba024408611b8cd3d77
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Android: Remove invalid error message

All usage of context menus prints out an error message because
onContextMenuClosed() is called more than once. We just return
silently instead if the method is called after the menu has
already been closed.

Change-Id: Ifa27ed42d188fdf670f09c4b1450b9fec0d5941f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
CoreWLan: Fix potential unhandled exception assert

-[QNSListener notificationHandler:] was declared as not taking any parameter,
but used as taking a single NSNotification. This would lead to an 'unrecognized
selector' exception raised by Cocoa.

Task-number: QTBUG-26844
Change-Id: I56d03a7738c2a1b9dcf3cdecc696b01e65d7b233
Reviewed-by: Liang Qi <liang.qi@digia.com>
Remove leading '/' from target paths.

This is inappropriate on Windows, and breaks non-prefix builds there.

This is only needed when we calculate a relative path from a sysroot,
so only add it in that case.

Task-number: QTBUG-34880
Change-Id: I0e3b3d977a7b56649e4ba0077ac574aabf1dc915
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QNX: Fix retrieving the window group name

The code assumes that there is a root window, and crashed
otherwise.

Task-number: QTBUG-35121
Change-Id: Idbf0e0bfc03cd427f0aab81db88b34fe94228c81
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Revert "Store the font's scalability in QFontEngine."

This reverts commit 65b12fbdb13d34c61bcadd5cc8fd6ee28a8dfafd.

QFontEngine is not always loaded from QFontDatabase, resulting in
the flag not being set.

Change-Id: I39bc5bd4a8dea153d191cfc55f4324195f75f64c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
CMake: Parse the output of new CMake versions.

As of CMake 3.0, the output of `cmake --version` now has a second line
showing that it is maintained by Kitware. Change the version parsing to
look only at the first line of output.

Change-Id: I347de4c376e0bde25a43a38d59587d9b63f6b43a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix sub-second handling in MySQL driver

As stated in http://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-data-structures.html
the content of MYSQL_TIME.second_part field is supposed to be
in microseconds not milliseconds.

Task-number: QTBUG-31124
[ChangeLog][QtSql][QMYSQL] Fix sub-second handling
Change-Id: I5718868029bdedab9508213e800d2dcf3da9be9a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Fix sub-second handling in SQLite driver

Use explicit format string, that contains milliseconds, when
converting an QDateTime/QTime to a SQLite field content.

Task-number: QTBUG-24200
[ChangeLog][QtSql][QSQLITE] Fix sub-second handling
Change-Id: Ib89152b7c3dd780b57a8826beff8b6b118e9d3d6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I860404a1ef18c88a968a9eded405bb67967047b9
Improve digitToCLocale sign char handling

This patch adds more char tests for the plus and minus signs to
ensure that e.g. number input widgets can be used with the locale
and the known sign chars.

[ChangeLog][QtCore] Fixed a bug that caused negative number input
using '-' to be rejected because the current locale uses e.g. 0x2212.
QIntValidator and QDoubleValidator now accepts both signs as well as
the locale minus sign.

Task-number: QTBUG-35069
Change-Id: I857105ca38b1d3826e27eb64645fef07149d74bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix font lookup.

Change match() to return an index and use that to reintroduce
the blacklist bookkeeping for fonts for which font engine
creation fails (for example, due to missing open type support).
Change the algorithm to retry search if that happens.
Add empty string as fallback for non-common scripts indicating
'try to find any font matching the script' as is done in Qt 4.

Task-number: QTBUG-34908
Change-Id: I9ac81ff1c275ebb635675dc26b52394789fca60c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Remove stale xcb_dri2 code in QXcbNativeInterface

Change-Id: Ifc8dc8d84fc60b70f8a49282dfe32cd248bef9ba
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Add new configure parameter for Xcb-Xlib

This adds a new configuration parameter, xcb-xlib, which allows
overriding the configure test for that existing configuration option.

The use of xcb-xlib in the xcb platform plugin becomes the preferred path
for non-OpenGL ES 2 builds, while the EGL codepath is used otherwise.
This has the advantage that EGL can be used with Desktop OpenGL if Qt is
configured with -no-xcb-xlib.

Change-Id: I5018e31fe0399b94f020c671eff9414d00431c44
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Move the glxfbconfig configtest to qpa and rename it to glx

We require glx version 1.3 which is where fbconfig is first defined.
Also make use of the configure test and report the glx status.
GLX support should always take precedence when compiling the
xcb backend

Change-Id: Ie46834210bf5cd2ac4006ff08379e0d3434ffa2b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Remove unused variable in font match() function.

Change-Id: I0752901556a44c3b7fb4440e3ba0ca88559c1fe2
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Streamline font match() function.

Determine writing system before executing the loop.

Change-Id: I6c462bdef4d70860e76c7cc9d939e3e92983b173
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
QSystemSemaphore: Clear error after successful operation

Change-Id: I5c1021b2329439e3aefaa1c0d9c0b8a298d285de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add QSystemSemaphore::release() auto-tests

Change-Id: I4c48f9ad8c60307e4b922d6a6b82e03e455f14d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>