Fix QString::toUcs4() returns incorrectly resized QVector

...when the string contains surrogate code points.

Task-number: QTBUG-25536

Change-Id: I07251fee641c14f33175678768ddbe551dbe2bb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stop using function deprecated in D-Bus 1.2 (raise minimum version)

The dbus_watch_get_fd function was deprecated in D-Bus 1.2 (technically,
in 1.1.1, but that was a development release) because it had a bad name.
Sockets on Windows have file descriptors, but they are not shared from
the same pool as the CRT library's file descriptors.

This commit raises the minimum required version of D-Bus to 1.2. This is
the first requirement raise since this code was introduced in 2006. For
some reason, the D-Bus 1.2.0 release seems to be missing, but 1.2.1 was
released on 04-Apr-2008. That's ancient enough for all distributions
Qt 5 is supposed to run on.

Change-Id: Ia6bbc137fffbb27c77290ed3e32d3380f0ae3c54
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Don't try to unload a library that isn't loaded

Both QPluginLoader::unload() and QLibrary::unload() protect against
that (they have a "did_load" member), but QFactoryLoaderPrivate's
destructor doesn't. In the past (Qt4) all plugins had to be loaded
anyway, so there was no mistake in the reference counting. With Qt 5,
we don't load plugins unless they're actually used (in
QFactoryLoader::instance).

Task-number: QTBUG-29773
Change-Id: I3278fa14bac7e26a9faaf999b4e42e950654ac9a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Autotest: check that the plugin was actually unloaded in QPluginLoader

Change-Id: I66d26da4e86add244d37ff670ad79ff2aff17ca1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Make sure that the reference count for plugins is kept correctly

For systems where the Unix signature checker isn't enabled (read: Mac
and Windows), QPluginLoader must actually load the plugin to query for
the metadata. On Mac it even tried to keep the library loaded to avoid
unloading and reloading again when the user calls load().

However, that plus the fact that it was calling load_sys() (on Mac)
meant that it would bypass the reference count checking. And on all
Unix, if a library-that-wasnt-a-plugin was already loaded by way of a
QLibrary, it would have an effect of unloading said library.

So remove the "caching" of the library. We should instead invest time to
write a proper Mach-O binary decoder.

Task-number: QTBUG-29776
Change-Id: Iebbddabe60047aafedeced21f26a170f59656757
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fix some warnings that have crept up since I last fixed warnings

qgtkstyle.cpp:3177:103: error: suggest parentheses around ‘&&’ within ‘||’ [-Werror=parentheses]
qcups.cpp:517:66: error: ‘QString::QString(const char*)’ is deprecated
itemviews.cpp:795:13: error: unused parameter ‘actionName’ [-Werror=unused-parameter]
qeglconvenience.cpp:268:9: error: ‘cfg’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I9b8a175ff1c2ddc443363e08b92e09cf7c2f91cf
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Introduced QWindow::setMask() to expose existing platform functionality.

Task-number: QTBUG-28555
Change-Id: I2c649b6d9e9dc69be246cb7658b3edbe9682b1bf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Add multi-line input method hint

Enabler for input on Android.

Change-Id: I44670b95b35f773814125c5d35c67e9713567813
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix thumb armv5 atomics

Change-Id: Ie9f98e5f5a08908d9d99e04bdc95fd506cc4a51e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Enablers for input methods on Android

Adding QInputMethod::inputItemRectangle()/setInputItemRectangle().

Known bugs: inputItemRectangle() not implemented for graphics view
items; inputItemTransform() implementation was already missing.

Change-Id: I72b1d43350e93858a2b374de3f2199500a96dc79
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add ISO 8859-11 as an alias for TIS-620

(qsimplecodec.cpp says so, but is unused when ICU is used)

ISO 8859-16 is still missing though...

Change-Id: Idbccedd7bad63f9788cec2f7fc1bbfcb7a891acc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tst_qfile: remove unused variable

Change-Id: I3c827b8a372158815cf234a548a85cf6165c189e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Cocoa: Remove qt_mac_toCGImage warnings

We got these because we were flushing the backing store with a
null QImage.

Change-Id: I372cb3fc7c82d3bdcfe735fcadfa72806d0ef39b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Update the display to reflect changes by input method

Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>

Change-Id: If3804f2a514ba4635f841de6377f2b328a4e928a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix compile on Android

This is a workaround for a broken compiler

Change-Id: I10c8c750caf56036419807ec4a2439bf14cf64d6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fix test script

This script was completely broken, and seems to have been abandoned.

Change-Id: If307f001237609ccb054c0a469213290294161c9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Style fixes for android enablers

Change-Id: I0b942865c29f4bdf29f0e7f56af0d620acbc39c6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Export QAbstractFileEngine[XXXX] classes.

We still need them for Android assets implementation.

Change-Id: I12bb809c05ac88f3c4a7d6796692b4dc3987027c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
ODBC: implementation of lastInsertId()

Implemented lastInsertId() for some ODBC compatible databases.

Change-Id: I0b75a8e68369af39e258e4761b384767ab8a371e
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
QT_MESSAGE_OUTPUT: add support for condition depending on the type

The motivation is to enable coloration the way KDE currently does.
It can now  be achieved with a QT_MESSAGE_OUTPUT set to
"%{appname}(%{category}) \033[31m%{if-debug}\033[34m%{endif}%{function}\033[0m: %{message}"

I was thinking about supporting directly color using something like
%{begin-category-color} that would be smart and detect if we are running
on a terminal, but it would be less flexible in the way the colors van
be configured.

Changelog: QT_MESSAGE_OUTPUT can contain conditionals based on the type
of the message

Change-Id: Icd8de04734a94a3afcbf542a5b78b290a1914960
Reviewed-by: David Faure (KDE) <faure@kde.org>