Commit Graph

1390 Commits

Author SHA1 Message Date
Alexandru Croitor
a9af99c926 Add windows platform plugin and its requirements
- executed pro2cmake script on windows qpa plugin
- added windowsuiautomation platformsupport project
- fixed plugin dlls and lib files to be written to the same path
- fixed an issue comErrorString which used implicit casting
  from QString to char*, but plugins are currently built
  with QT_NO_CAST_TO_ASCII

Task-number: QTBUG-74140
Change-Id: I5db3b6c5264bbd5dfba2998b049fda36eb312c70
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-18 15:35:07 +00:00
Alexandru Croitor
3f03917b54 Fix Windows build
- Fix qmake build
- Fix QtNetwork moc-ing, by including the moc files
  inside the cpp files
- Fix sql odbc plugin by including QT_PLUGIN define
- Fix Boostrap to link against the Platform target, to get the
  correct Unicode and WIN64 defines.
- Fix vulkan headers to be found
- Fix freetype bzip and png unresolved symbols / linker issues
  when building minimal platform plugin (also need to make
  sure to use the vcpkg toolchain instead of CMAKE_PREFIX_PATH
  because then find_package is overridden, which does magic
  to properly propagate static library dependencies).
- Fix qfilesystementry test not to be built without private
  tests feature (it led to undefined symbols issues).
- Make sure to remove QT_NO_CAST_TO_ASCII define when building
  QtCore, so that the qstringbuilder3 test builds
  successfully.

Task-number: QTBUG-74140
Change-Id: I353d08392b604d55f8e62cdd8696d1e19a3c084a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-18 15:34:52 +00:00
Liang Qi
32c59d6856 cmake: fix cocoa and graphics on macOS
Change-Id: Ia956c74a54874f91cc0ea8e5105164de88890ff2
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-06 13:18:20 +00:00
Simon Hausmann
519ef817ff Fix Desktop GL/EGL/GLESv2 linkage
This change fixes a few things in one go:

  * cmake's FindOpenGL cannot be used reliably to detect EGL. So use a
    custom module for that.
  * Added a custom module for GLESv2 detection, as cmake's FindOpenGL
    does not support that.
  * Map CONFIG += opengl to a WrapOpenGL target, which links against
    either GLESv2 or libGL - just like mkspecs/features/*/opengl.prf
  * cmake's FindOpenGL remains in use solely to detect the availability
    of desktop gl.

Change-Id: I9315e5ad1fd88e1b7dc7e920053e98fb51fea7fc
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2019-02-12 14:57:30 +00:00
Albert Astals Cid
05aeaed906 Find mtdev and use it
Change-Id: I90db48efaa6a23add770fcf69b46c4f4c84866c1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-02-12 13:35:07 +00:00
Albert Astals Cid
f18db41f85 cmake: Find tslib and build the tslib plugin if found
Change-Id: I7119ddf473a3ede29bbfef23cffb08a4fcbd5681
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-11 17:16:17 +00:00
Albert Astals Cid
8ee0cb04bd cmake: build glxconvenience
Change-Id: Iad09a86d11565665bb06d8d5d5616fc1b35ad777
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 14:02:12 +00:00
Albert Astals Cid
ad312879b5 cmake: Build platformcompositor
Change-Id: Ib9855e8ce0abddf5dce3408f10d3c2d32a2df937
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 14:00:23 +00:00
Albert Astals Cid
553254ba50 cmake: build eglconvenience
Change-Id: Iba578190feb06953bfcba62978d2ba5b7ff35cb7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:59:50 +00:00
Albert Astals Cid
8a1110f388 cmake: build kmsconvenience
Change-Id: I3e1cdb4b9dd26a74262a183d8137ed2011a6e52d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:25:09 +00:00
Albert Astals Cid
6b637d1afe cmake: Use the proper libudev library
Change-Id: I884756473a8c26a4ef17472aaaceb94509d3c72f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:24:41 +00:00
Albert Astals Cid
03d096d11a cmake: enable src/platformsupport/input
Change-Id: Iafe75f55c579779d3d25a0147d993904622161fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-11 13:24:01 +00:00
Albert Astals Cid
487adb4d7d Add devicediscovery and fbconvenience
Generated by pro2cmake.py

Change-Id: I405430c622824aab9a7bf6839b2271a494856c24
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-02-11 09:27:45 +00:00
Albert Astals Cid
70419e31f9 cmake: Fix build of xcb platform plugin when vulkan is available
Change-Id: I79760aa0cb08752cfc20aabc1a890f60c91c9dfd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:27:11 +00:00
Albert Astals Cid
773999816e cmake: glib changed name to glib2
Change-Id: I4a86bd3b01e1fe307e9802182df943245a7fce4c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-01 12:26:21 +00:00
Tobias Hunger
6a1ee4de07 CMake: Store Qt features in CMake Cache
This is less self-contained than what we have, but significantly speeds
up cmake configure/generate runs.

This patch also warns when a feature is already defined.

Change-Id: I8cab63e208ba98756b47d362a39b462f5ec55e20
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-17 16:16:55 +00:00
Tobias Hunger
e57a94cbd8 CMake: Use AUTOMOC/AUTOUIC/AUTORCC
Change-Id: I0235ca4f227623e5937348b4b010637921dbf154
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-14 14:04:59 +00:00
Tobias Hunger
0ec6b3049b Add linuxaccessibility support
Change-Id: I6766756e58cadf2d3f13331f4a453123ea575c6f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-01 11:49:49 +00:00
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +00:00
Simon Hausmann
38ead1f24f Fix build without PCH
These inclusions are necessary when compiling without pre-compiled headers.

Change-Id: I4345ad3f6882046e4b8f2ba9d315299e280c9f18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-13 18:34:51 +00:00
Qt Forward Merge Bot
fedcaf0256 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I2715ee7c694e5579bcedc7bab0ae68e79d5fd0b6
2018-10-13 00:07:20 +02:00
Gatis Paeglis
8315acfb16 Revert "glib dispatcher: ensure all window system events are flushed"
This reverts commit 341bfcd1ea.

As it turns out there might be use cases where we want to have proper
windowing system event integration with glib dispatcher via g_source_attach().
For example with gtk_dialog_run, where GTK blocks in a recursive main loop.
We want to continue dispatcing our windowing system events during this nested
event loop. Not having a proper glib integration can result in rendering issues,
e.g. when resizing parent window via mouse while GTK-based dialog is shown. Can
be seen on examples/widgets/richtext/textedit/ -> Format (from menu) -> "Color..."

The issue from 341bfcd1ea actually should be fixed inside XCB platform plugin,
by improving integration with event dispatcher. That is handled in follow-up patches.

Change-Id: Icabc6d841a554aefbdd460765a3165d22e65f651
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-10-12 10:21:32 +00:00
Qt Forward Merge Bot
69b6845edb Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I5cbfd39cf728036bbdfdeec8e8739568e0a3025b
2018-10-09 01:00:48 +02:00
Qt Forward Merge Bot
b4da5c6b93 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/corelib/tools/qtimezoneprivate.cpp

Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
2018-10-08 10:00:49 +02:00
Sergio Martins
7146c9075c Fix DejaVu fonts URL
http://dejavu-fonts.org is something else nowadays

Change-Id: Idb03b864fb145b016ce4ae1a2f0df02ff80280a8
Reviewed-by: Rolland Dudemaine <rolland.dudemaine@esol.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-10-06 11:10:49 +00:00
Qt Forward Merge Bot
0e1866017f Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I6083c3e61b7dbe188f83676f7e7bb268e5ccf2f3
2018-09-29 01:00:10 +02:00
Eskil Abrahamsen Blomfeldt
9601ad4e27 Fix font weights on macOS 10.14
On later versions of macOS, the font weight trait of fonts is a 64 bit
double, not a 32 bit float, and on macOS 10.14, CFNumberGetValue()
started returning false for values when the type conversion is lossy,
like it is documented to. Therefore, we would end up without weight
information in 10.14.

The fix is to ask for a double instead, which works regardless of
whether the CFNumber represents a 32-bit or 64-bit value.

[ChangeLog][macOS][Text] Fixed font weights on macOS 10.14

Task-number: QTBUG-69955
Change-Id: Ia0577236ddc6b96f9231e6de7b1c49f7f8a837a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jason Haslam <jason@scitools.com>
2018-09-27 06:50:46 +00:00
Eskil Abrahamsen Blomfeldt
c4a524f3a1 Remove DirectWrite warning when loading bitmap fonts
We use DirectWrite to determine whether a font is a color font
or not, so all fonts go through DirectWrite initially. However,
the load call will fail for bitmap fonts, causing us to output
lots of pointless warnings each time such a font was in use.

Instead, we only output this warning if we actually plan to
load the font through DirectWrite later. If the load fails,
we can assume it is not a color font and do not need to output
any warning for this.

[ChangeLog][Windows][Text] Removed confusing DirectWrite warning
when loading bitmap fonts.

Task-number: QTBUG-57180
Change-Id: Iaac8117745ef05a1dff23b346dbe0c6dbfb315f7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-09-26 10:50:29 +00:00
Friedemann Kleint
e646ab2ab5 Windows code: Fix to prefer ranged-for, as clang-tidy advises
Change-Id: Id9bb21855ae832cdbbc456326226ec72b634672e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 16:05:39 +00:00
Jan Grulich
101cb8e5d9 Make flatpak portal support to be used also by Snap applications
Snap now uses xdg-desktop-portal for portal support. Add check for apps
running in Snap and make them use portals by default. We also should be
using different name for the platform theme used by sandboxed apps.

Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 14:15:38 +00:00
Friedemann Kleint
9a15ac356c Windows code: Fix clang-tidy warnings about (private) class definitions
Add override, disable copies where appropriate and use = default
for trivial functions.

Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-02 12:39:12 +00:00
Andre de la Rocha
4c4a5f8c86 Windows: Check Pointer messages in MessageDebugEntry
Some Pointer Input messages are defined only for Windows 10 and new
versions of the Windows SDK and could break compilation with older
SDKs. Currently, they are not used anywhere outside of the
MessageDebugEntry debug function. Checking if they are defined before
using.

Change-Id: I5fc7bb8e52ab8aca66bb21084289ab8938938063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-09-01 22:51:07 +00:00
Friedemann Kleint
64e6441d9c Windows code: Fix clang-tidy warnings about C-style casts
Replace by reinterpret_cast or const_cast, respectively.
Use auto when initializing a variable to fix Clang warnings
about repeating the type name, do minor tidying along the way,
and a few conversions of 0 or NULL to nullptr.

Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-30 06:26:44 +00:00
Friedemann Kleint
14bbb18571 Windows Font databases: Rename struct FontNames to QFontNames
Prefix by Q to unclutter the namespace in static builds.
Amends 9204b8c31e

Task-number: QTBUG-53458
Change-Id: I1448cd944b6a3262b9cfa9f5c3fbab17c1c5c71c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-28 10:19:25 +00:00
Tor Arne Vestbø
0de4b76b9c macOS: Take application appearance into account when drawing glyphs
macOS 10.14 uses a new font smoothing algorithm that takes the fill color into
account. This means our default approach of drawing white on black to produce
the alpha map will result in non-native looking text when then drawn as black
on white during the final blit. As a workaround we use the application's current
appearance to decide whether to draw with white or black fill, and then invert
the glyph image in the latter case, producing an alpha map. This covers the
most common use-cases, but longer term we should propagate the fill color all
the way from the paint engine, and include it in the key for the glyph cache.

At the moment we do not react to changes in the application appearance,
as that seems to be buggy in general in Qt (palette/style, e.g.), and those
bugs need to be weeded before we can react to the theme change with confidence.

Task-number: QTBUG-68824
Change-Id: Ibbfd49fcf3a091e454009c08159f46b3499e2bd0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-24 13:42:59 +00:00
Ulf Hermann
0a06e1baf9 Modernize the "thread" feature
Add it to configure.json and replace all occurrences of QT_NO_THREAD
with QT_CONFIG(thread). Add conditions for other features that depend
on thread support. Remove conditions where we can use the QMutex and
QThreadStorage stubs.

Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-17 00:34:36 +00:00
Jędrzej Nowacki
9767a47173 Remove forward declaration of non existing class
QUnixEventDispatcherQPA has no private class, there is no need to
declare a fake one.

Change-Id: I615304709fbbea83f6747bb6202dbfd2cc03256d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-07 11:54:07 +00:00
Thiago Macieira
98dda3f5ac Move the createUnixEventDispatcher() function to a namespace
Easier than renaming it with a "qt_" prefix everywhere it's used
(it's in a lot of plugins).

Change-Id: Ie01831ddac5446fdbdeefffd15468918f3bc2238
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-03 20:26:53 +00:00
Frederik Gladhorn
b9b53adb69 Minor grammar fixup
Change-Id: I528a2b2d8e9734bf5c00948a78369f4e89af16fc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-03 18:11:24 +00:00
Frederik Gladhorn
4d9fb42bb9 Fix EDID vendor table generation script: source git repo is gone
fedorahosted seems to be gone and I didn't find a better source for the
data.

Change-Id: Ifb02b9833a735bab4aff2dc7a6db46aedd567583
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-03 18:11:17 +00:00
Frederik Gladhorn
faa67443fe Keep EDID pnp IDs sorted
In Python 3.6 the sorting comes for free, since dict keeps the insertion
order, but adding sorted means older Python versions behave the same.

Change-Id: I3ac4c0f5c3739cb8b284c8a02c4a96b5f41b2286
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
2018-08-03 18:11:11 +00:00
Frederik Gladhorn
e201878b93 Fix manufacturer parsing from EDID
The code was quite dubious, in the edid data, the manufacturer is
encoded with a three letter shortcut. In addition it can be set by the
extra data strings, which is not often the case. We would randomly
overwrite the identifier string, so clearly separate the pnpId (3 letter
ID) out and use the fallback table we have.
Also looking up the manufacturer string twice is pointless (contains and
then operator[]).

Change-Id: I18882a78d69b9f3dfc2af31e646ded44f2b70a50
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-03 18:11:01 +00:00
Frederik Gladhorn
5273604dac Fix EDID parsing: strings can be 13 bytes
The spec gives 13 bytes (5 header, 13 data in increments of 18).

Change-Id: I059590cd750ac403a1f3b44b5f9a0ee300cff5b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
2018-08-03 18:10:54 +00:00
Qt Forward Merge Bot
1783fca897 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/xcb/qxcbintegration.cpp

 Conflicts git missed:
	src/plugins/platforms/qnx/qqnxglcontext.cpp

Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
2018-07-17 10:19:22 +02:00
Andre de la Rocha
20d6dac63c Add Windows Pointer Input Messages support
Replaces the handling of tablet/touchscreen/touchpad/mouse input with a
unified implementation based on the Windows Pointer Input Messages added
to Windows 8. The legacy implementation is still used for Windows 7.

Task-number: QTBUG-60437
Change-Id: I0a0f48ee9d5365f84ba528aa04c6ab1fe4253c50
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-12 09:52:07 +00:00
Thiago Macieira
55fc9a5dd9 Fix Clang annoying, useless warning about using %llu when it wants %lu
The types have the same size. So it's stupid for it to make the issue a
warning...

 qkmsdevice.cpp:737:88: error: format specifies type 'unsigned long long' but the argument has type '__u64' (aka 'unsigned long') [-Werror,-Wformat]

Change-Id: I117816bf0f5e469b8d34fffd153e640b62bef635
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-05 14:50:35 +00:00
Liang Qi
e3ed2281c0 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/cocoa/qnsview_dragging.mm
	src/plugins/platforms/ios/qiosinputcontext.mm
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/tools/androiddeployqt/main.cpp
		Was moved from qttools into qtbase in 5.11.
		So re-apply 32398e4d here.
	tests/auto/corelib/global/qlogging/test/test.pro
	tests/auto/corelib/global/qlogging/tst_qlogging.cpp
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
	tests/auto/corelib/thread/qthreadstorage/test/test.pro
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
	tests/auto/widgets/kernel/qapplication/test/test.pro

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
2018-07-02 11:23:45 +02:00
Christian Muehlhaeuser
9e15a93b89 Fix mouse-wheel handling for evdev devices with extended values
Newer mouse devices support a so-called "free-scroll" mode, which
unlocks the wheel and allows for faster scrolling. For such input
devices, evdev will report an event value greater than 1, when free
scrolling is active. Examples for such devices would be the Logitech
G700 or MX Master series.

However QEvdevMouseHandler interpreted such an event's data incorrectly
and triggered wheel events for the opposite scrolling direction. This
also often resulted in jittery & jumpy scrolling, when the events'
values alternated between 1 and 2.

Change-Id: Ibb23ed4419d647fff9b90d371d5bb4037cf2bd9b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-06-22 11:14:53 +00:00
Alexander Volkov
d640dbf730 QDBusTrayIcon: Avoid needless initialization of a global var
TempFileTemplate is initialized each time an application starts.
It leads to the call of QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation)
which is slow and can even change permissions of the runtime directory.
Use a static wrapper function to initialize this variable only when needed.

Change-Id: Ib620f9b842c88103c67f8dfab200f4d39c9981ee
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-06-22 10:28:33 +00:00
Friedemann Kleint
3f01dc1995 QWindowsFontDatabase/QWindowsXPStyle: Fix compilation with g++ 8.1/MinGW
Silence warnings about copying/clearing memory types which g++
considers non-trivial, for example:

windows\qwindowsfontdatabase.cpp:1003:75: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const ushort' {aka 'const short unsigned int'} [-Werror=class-memaccess]
         memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength);
qwindowsxpstyle.cpp:946:46: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess]
                 memset(&data, 0, sizeof(data));
                                              ^
qwindowsxpstyle.cpp:1053:38: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess]
         memset(&data, 0, sizeof(data));

by introducing a cast.

Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I160eb5fc7b64a2bc404e1fa61d306af2662d1252
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-21 12:29:29 +00:00