Commit Graph

1791 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
50d41f14ee Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I14f539ccfa4ab6e21188b98c314bdb030f3b9f70
2019-10-11 01:01:15 +02:00
Shawn Rutledge
18aa8390ce Add qt.qpa.input.events logging to evdevtouch
The xcb platform plugin uses this category for detailed input event
logging, so we might as well be consistent in evdevtouch.  When hardware
supports pressure sensing, it's likely to need extra debugging.

Task-number: QTBUG-77142
Change-Id: I7682bb5d49e669054523f9cf556715e511bcd572
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-10 06:10:29 +02:00
Qt Forward Merge Bot
8b91c68315 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Iab9b3a7d004a2e4b4de816f4a2d7ed2fb936d3ae
2019-10-10 01:01:26 +02:00
Shawn Rutledge
ee9bc61cd9 evdevtouch: Report stationary touchpoints that include pressure changes
Task-number: QTBUG-77142
Change-Id: I35446092679573df51891302155c896a3bb6fc1c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-08 23:16:30 +02:00
Tor Arne Vestbø
c962c77044 CoreText: Warn the user when family alias lookup slows down the application
If the user specifies a font family in their application that doesn't
exist in the system, or one that uses the localized family name, we
will end up resolving the family alias for all fonts in the system,
which typically adds 600-800ms of startup time. Let the user know
when this happens.

Change-Id: Id8d6f55028e37f681ec4a686df25d33240b5a30f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-08 19:11:12 +02:00
Laszlo Agocs
45b76fc4ea eglfs/linuxfb: Add an env.var. to disable screen/cursor control
By default we disable screen blank and hide the cursor. This is something
inherited from Qt 4. Then reset to some default values when exiting.

This is not ideal when the system is configured with kernel parameters
like consoleblank=0 or vt.global_cursor_default=0.

So have a way to skip all tty voodoo. On systems where relevant,
one can now launch with QT_QPA_PRESERVE_CONSOLE_STATE=1 set.

[ChangeLog][Platform Specific Changes][Linux] Added an environment
variable QT_QPA_PRESERVE_CONSOLE_STATE that can be used to prevent
Qt from altering the tty screen and cursor settings when running
with platforms like linuxfb and eglfs.

Task-number: QTBUG-61916
Change-Id: I0e84e53f2d5fca992a7d26d0280ba35e30523379
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-10-08 14:32:12 +00:00
Alexandru Croitor
9ff225b0e0 Regenerate platformsupport projects
Change-Id: I6f9d6b09a0b62171adedffa326b86f57e42ad449
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 13:09:50 +00:00
Qt Forward Merge Bot
2c4b44d750 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ife31dad3c8dc43c5ff4d266e6d646230c5d20a50
2019-10-06 01:01:08 +02:00
Liang Qi
96a2044009 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplyhttpimpl.cpp

Change-Id: I059be651604623616fd31e8616be8ae61b4f8883
2019-10-04 15:27:15 +02:00
Tor Arne Vestbø
e46a0501d6 CoreText: Use categorized logging
Change-Id: I4cfa6b0ef15adb7e600d66f4fe5b3dc17470f1c3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-04 15:09:35 +02:00
Albert Astals Cid
3afe4a402c Convert a few sizeof(array)/sizeof(element0) fors to range fors
Increases readability

Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-04 09:00:24 +02:00
Qt Forward Merge Bot
4c8814a341 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
2019-10-02 08:39:15 +02:00
Rolf Eike Beer
72d62144ab tslib plugin: remove debug print on old tslib versions
This introduces a dependency on ts_get_eventpath(), which is only
available in tslib 1.15 and newer. This raises the required version to
an unneeded level, so just drop the debug message if the API is not
available.

Change-Id: I4a1cd7abec8d139e70555506d9d21edacf0f4d71
Fixes: QTBUG-78867
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
2019-10-01 10:36:24 +02:00
Liang Qi
99cdd5fc67 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/global/qrandom.cpp
	src/corelib/io/qfileinfo.cpp
	src/corelib/kernel/qeventdispatcher_win.cpp
	src/corelib/kernel/qeventdispatcher_win_p.h
	src/gui/text/qfontdatabase.cpp
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/testlib/qtestcase.cpp

Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4893212471aa24be804c989a581810e2f714545c
2019-09-30 14:43:02 +02:00
Eskil Abrahamsen Blomfeldt
d5abda313d iOS: Fix fallback fonts on iOS 13+
Since iOS 13, the cascade list for the default UI font contains
meta-families for several writing systems, such as CJK. Since
these font families were never populated to the database, we ignored
them in Qt, and thus got missing glyphs for the characters in question.

The fix is to make sure these fonts are populated in the database.
It contains a partial backport of 922d195020,
which adds the qt_isFamilyPopulated() accessor to allow us to check
if the family has been populated in the font database. In Qt 5.14,
there is public API for this in QPlatformFontDatabase, so this is
a temporary resolution until then.

Fixes: QTBUG-77467
Change-Id: Ia9ebb8a19ad2367eb764ae1496a52966b465336b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-26 10:32:25 +00:00
Allan Sandfeld Jensen
d512f5ac3a Handle returned bitmap glyph when not requested
Add back code to handle bitmap glyphs returned when we did not request
a bitmap glyph. This is a can happen on some configurations where
bitmaps are not suppressed.

Fixes: QTBUG-78116
Change-Id: Ie0c6cfbf9c50456431b0e3a23e568f3399e5a879
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-09-25 14:46:36 +02:00
Qt Forward Merge Bot
c0f7cc3a3c Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ic274a375d6fc1312ced2354e034dc0980dd47c51
2019-09-22 22:28:33 +02:00
Joerg Bornemann
73f880d393 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/makefile.h

Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
2019-09-20 08:20:47 +02:00
Simon Hausmann
e3888dd932 Merge remote-tracking branch 'origin/wip/qt6' into dev
Conflicts:
	src/gui/image/qpicture.cpp

Change-Id: Iecf79f96f54dc23bd703e6c4c634f909b796d7b3
2019-09-18 08:30:11 +02:00
Shawn Rutledge
15e1c15986 evdevtouch: Add fallback definition of ABS_MT_PRESSURE; fix alignment
Fixes: QTBUG-78298
Change-Id: Ib6acb1fdca551a84aba5dec2f28cf784a212692c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-17 15:30:43 +02:00
Tor Arne Vestbø
7f0faddf9f CoreText: Modernize style hint fallback lookup
The DefaultFontFallbacks.plist system file that we used for looking up
style fallbacks does not exists in macOS 10.15, nor did it ever exists
on iOS. Instead of relying on this file, we hard-code a set of default
families, that we then look up the fallbacks for.

The result of QFont::defaultFamily() on macOS is now:

  QFont::Helvetica --> "Helvetica"
  QFont::Times --> "Times New Roman"
  QFont::Courier --> "American Typewriter"
  QFont::OldEnglish --> ""
  QFont::System --> "Lucida Grande"
  QFont::AnyStyle --> "Lucida Grande"
  QFont::Cursive --> "Apple Chancery"
  QFont::Monospace --> "Menlo"
  QFont::Fantasy --> "Zapfino"

And on iOS:

  QFont::Helvetica --> "Helvetica"
  QFont::Times --> "Times New Roman"
  QFont::Courier --> "American Typewriter"
  QFont::OldEnglish --> ""
  QFont::System --> "Helvetica"
  QFont::AnyStyle --> "Helvetica"
  QFont::Cursive --> ""
  QFont::Monospace --> "Menlo"
  QFont::Fantasy --> "Zapfino"

Fixes: QTBUG-78240
Change-Id: Ie9bc13c9c1031d89f024199e4736a046c568a48d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-16 11:26:07 +02:00
Mårten Nordheim
2cf0ba1fba Use pre-compiled headers when building Qt with cmake
Some modules define their own manually-maintained lists, and we can rely
on the headers generated by each module to include in the pch as well
e.g. QtCore/QtCore.

There's also e.g. QtWidgetDepends for QtWidgets, but this only
works for modules, not for tools, examples or other applications.
For now we'll use the Qt<Module>/Qt<Module> headers for the
modules we depend on.

Building with PCH can be disabled with -DBUILD_WITH_PCH=NO, and it only
works for versions of CMake newer than 3.15.20190829.

Change-Id: Iae52bd69acfdfd58f4cd20d3cfa3c7f42775f732
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-11 08:25:54 +00:00
Friedemann Kleint
1d53b6d9f2 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp

Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
2019-09-09 07:51:49 +00:00
Qt Forward Merge Bot
1f35c8caa0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
2019-09-08 11:33:28 +02:00
Liang Qi
6a36fe904c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/codecs/qicucodec.cpp
	src/dbus/qdbusserver.cpp
	src/gui/painting/qbezier.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/printsupport/cups/qppdprintdevice.cpp

Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
2019-09-04 07:03:54 +02:00
Shawn Rutledge
1b0c45f683 Deliver stationary touchpoints that have changed pressure
As a rule, we don't deliver touch events containing only stationary
touchpoints.  To fix QTBUG-52510 we added an exception in
1bd0ab7050 : if the velocity changed,
deliver it anyway.  Now we need to do the same if the pressure changed.

Also, on the customer's hardware, pressure is indicated via ABS_MT_PRESSURE.

Change-Id: If7f7088df055d686cdd86967b999e38024f8170f
Fixes: QTBUG-77142
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-02 20:25:06 +02:00
Paul Olav Tvete
181e5382e7 eglfs/kms: Add drm atomic blend_op property handling
Add support for specifying the blend operation used when alpha-
blending KMS planes. Only available with atomic modesetting.
Set the environment variable QT_QPA_EGLFS_KMS_BLEND_OP to
the enum value of the 'blend_op' property.

Task-number: QTBUG-75659
Change-Id: If0ef5ba314b88adb530113b608d20fc9c027c5ec
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-08-22 15:38:08 +02:00
Paul Olav Tvete
2f52e1da0d Merge remote-tracking branch 'qt/5.12' into 5.13
Conflicts:
	src/gui/configure.json
	src/gui/util/qtexturefilereader.cpp
	src/gui/util/util.pri
	tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp

Change-Id: I2bc4f84705b66099e97330cda68e0b816aceb9cc
2019-08-20 10:41:56 +00:00
Qt Forward Merge Bot
56f46ba13d Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ia3645f92b9debf3e1fe2d972300c7d0dbd649268
2019-08-16 01:00:33 +02:00
Alexandru Croitor
c7ec7cd2a1 Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
2019-08-15 16:53:19 +02:00
Laszlo Agocs
80e7120feb eglfs/kms: Re-enable drm/gbm format overrides in the config file
Follow up to 091a386eaf

Defaulting to querying from the egl config is fine, but dropping support
for the "format" key in the output list in the json config file is not
ideal.

Task-number: QTBUG-76748
Change-Id: I25dc99369d118c300cdef25b464426f6be85453b
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-08-15 10:12:22 +02:00
Qt Forward Merge Bot
c5c9380555 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Id7954ada1f8658d3b1da5e8241a09f2d201a7c56
2019-08-15 01:00:30 +02:00
Laszlo Agocs
4bab72368f glx: Do not flood with warnings when reducing during config lookup
With things like sample count reducing a format (16 -> 8 -> 4 -> ...)
and trying again is perfectly fine. There is no need to show warnings
in this case. Even some of our own examples in qtdeclarative do a
setSamples(16) which is rarely supported. These all show warnings since
8ec98fc2dc. Avoid this.

Change-Id: Ice83d5720b02e92f77cfd63918c98ad222513b6a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-08-14 14:45:00 +02:00
Laszlo Agocs
02ae522f54 eglfs: Drop annoying warnings without drm atomic
No point in warning on every application startup that framebuffer size
setting is not available. Just ignore it then.

Change-Id: Id36ff0ab9560b99cc3f2d56a4ee51455cfa43cb7
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-08-13 17:30:26 +02:00
Liang Qi
1dade1bd8a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	mkspecs/win32-clang-msvc/qmake.conf
	src/corelib/tools/qlist.h
	src/gui/painting/qcompositionfunctions.cpp
	src/gui/painting/qtriangulator_p.h
	src/gui/text/qfontengine_p.h
	src/network/kernel/qhostinfo_p.h
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp

Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
2019-08-13 09:46:17 +02:00
Liang Qi
44c393f9b6 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	config.tests/arch/write_info.pri
		Repair architecture config test for the WASM_OBJECT_FILES=1 build mode
	configure.pri
	tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp

Done-With: Jörg Bornemann <joerg.bornemann@qt.io>
Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
2019-08-12 13:23:11 +02:00
Lars Knoll
afb326f071 Refactor lockedAlphaMapForGlyph
Simply return a Glyph pointer and not a QImage to avoid allocating and
deleting lots of d pointers for QImage when drawing text. Saves one
new/delete pair per glyph drawn and speeds up text drawing by 10% for
relatively large glyphs (probably more for smaller ones).

The qtext::paintLayoutToPixmap() benchmark shows a 16% improvement
in performance with this change.

Renamed the method to glyphData().

Change-Id: I7a353de521e4f4321c770fb1ac6043d33f6f332c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-08 11:18:02 +02:00
Marc Mutz
80179e3b7e Port users of QDBusAbstractInterface::(async)callWithArgumentList() to new variadic (async)Call()
Except in the auto-generated files.

Required to add a cast operator from QDBusObjectPath to QVariant, as the
variadic call() uses QVariant(arg) instead of QVariant::fromValue(arg).

[ChangeLog][QtDBus][QDBusObjectPath] Added explicit cast operator to QVariant.

Change-Id: I3f3004f7b9300a6340d27488f5b97981cbab3c24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-07 20:09:17 +00:00
Eskil Abrahamsen Blomfeldt
31753adebe Revert "Fontconfig font database: Short-circuit matching by filename"
This reverts commit eea99e1e8f.

The call to FcFreeTypeQuery() takes over 300 ms for
NotoSansCJK-Regular.ttc and friends, so in the current state,
this change cannot be used. I am not sure why these file
in particular takes so long, but it might be because it is
large (around 19MB) or because it is a font collection.

The original fix was intended to be a smaller performance
optimization, but it has added over 2 seconds startup time to
simple applications showing Chinese text, so we revert it
for now and it can be resubmitted later when the problems
have been ironed out.

Task-number: QTBUG-77108
Change-Id: Ibb2ef799573d7effd1595d788939fe33d82cc923
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-07-30 09:10:01 +02:00
Yuya Nishihara
7cf9f4e3d3 kms: Try to preserve existing output routing as weston would do
This is basically a backport from weston:
75487c2560

It states that:

 - preserving the existing CRTC -> encoder -> connector routing will
   make the startup faster
 - the existing routing may be set according to some device limitations

Since the QtWayland implementation appears to be based off an old
version of weston (maybe pre-2.0), this patch might look different from
the latest weston implementation. But the idea stays the same.

FWIW, this works around the issue I've seen on Renesas R-Car E3 (aka
Ebisu) board. Without this patch, VGA1+HDMI1 setup would fail because
the device reported possible_crtcs=1 (meaning {crtcs[0]}) for the second
screen "HDMI1", but the crtcs[0] was already taken by the first screen
"VGA1".

  No usable crtc/encoder pair for connector "HDMI1"

With this patch, the crtcs[1] is paired with "VGA1" (as it is the
existing routing), so the crtcs[0] can be allocated for "HDMI1".

Change-Id: Ibd304a8b5efbe4a8aa94b2c5697fe2b399386280
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-07-29 21:46:58 +09:00
Dominik Holland
a2fa624c79 Revert "eglfs: Add vsync support when using NVIDIA eglstreams"
This reverts commit df2b76046d.

The patches causes high cpu load and it looks like vsync is done
by newer NVIDIA drivers out of the box without such a implementation.

Change-Id: I41c9cfcf1bbdf7da9b764394e4442768084e9a35
Fixes: QTBUG-74866
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-07-26 11:33:38 +02:00
Qt Forward Merge Bot
64df0eda36 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/global/qlogging.cpp
	src/gui/painting/qtextureglyphcache_p.h
	src/gui/text/qfontengine.cpp
	src/widgets/widgets/qlineedit.cpp

Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
2019-07-17 10:44:21 +02:00
Qt Forward Merge Bot
77d126ccb5 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	configure.pri

Also required s/solid\.color/solidColor/ in a couple of places in:
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
2019-07-12 12:23:29 +02:00
Alexandru Croitor
4dac45c9ee Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
2019-07-11 17:17:51 +02:00
Marc Mutz
60ca2f5f7c Be less laissez-faire with implicit conversions to QChar
QChar currently is convertible from nearly every integral type. This
is bad code hygiene and should be fixed come Qt 6.

The present patch is the result of compile fixes from marking these
constructors explicit. As is clear from the distribution of fixes,
only low-level string handling code used these implicit conversions,
an indication that they're not in widespread use elsewhere.

Change-Id: Ief5336f21e6d181e03ab92893b3d13a14adc7cb0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-09 07:09:44 +02:00
Andreas Hartmetz
eea99e1e8f Fontconfig font database: Short-circuit matching by filename
If the filename matches, no other matching is necessary. Fontconfig
doesn't have a fast path for that, so implement one here.
Fontconfig is unlikely to add that fast path, see here:
https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/103

With -O1 builds of Qt and KDE stack, 358 fonts installed according
to KDE systemsetting, on a Ryzen 1800X, startup time of kwrite
decreases as following according to perf stat:
msec task-clock: ~480 ms to ~455 ms
cycles: ~1.73e9 to ~1.65e9

Change-Id: I630a80e4bed2647d5bbd95247005aab7d0cb0363
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-07-06 19:55:02 +02:00
Marc Mutz
f574560948 Fix compilation with C++20
Implicit capture of 'this' in [=] is deprecated in C++20.

Fix by using explicit captures.

Change-Id: I1633446f4670202b0d1aca938d8c27dbc0c1411e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-06 11:57:31 +00:00
Marc Mutz
cd113d0dcb Port some trivial cases from QMutex to QRecursiveMutex
In all of these cases, the effect of the change is local to one file.

Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-07-06 11:22:37 +02:00
Eskil Abrahamsen Blomfeldt
78caba7ae6 Support pen color with color fonts
Color fonts may also contain regular alphabet characters that
should be rendered with the current pen. In Qt, however, these
characters were drawn into the cache with a default pen color
of black.

Since all characters in a font is currently backed by the same cache,
and it would require a lot of plumbing to get around this, a step
in the right direction is to include the current pen color in the
cache as long as it is an RGB cache. This means that drawing
text with the color font with different pen colors will create
different caches.

There is no API to select font color on Freetype currently, but
this problem has also not been observed there, as the fonts
in question, with both regular and color glyphs, are not being
detected as color fonts (so the text color will be correct).
So Freetype will be left out for now.

[ChangeLog][QtGui][Text] Fixed bug where regular text rendered
with a color font would always display in black.

Task-number: QTBUG-55096
Task-number: QTBUG-74761
Change-Id: Icc7dbf73241db1e7cc6a0de18c2de927aeecf713
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-07-05 06:02:55 +00:00
Qt Forward Merge Bot
7265fb0597 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
2019-06-28 01:00:23 +02:00
Marc Mutz
8da3eea4fb Optimize some atomic counters
Define the static QAtomic at file scope to avoid GCC's pessimisation with
function-static QAtomic (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561),
and make sure the initial value is 0, so it ends up in BSS, not TEXT.

In QRhi..., don't create a static instance of the wrapper class, use a file-
static atomic, too. This turns the class into a glorified namespace.

Change-Id: I707f628e2b434330028077223071716d5704ba32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-27 20:00:17 +02:00
Johan Klokkhammer Helsing
53da86fe8c Add a QVkConvenience class with vkFormatFromGlFormat
Converts from OpenGL formats to Vulkan formats.

There are commented out lines for the formats in QOpenGLTexture::TextureFormat
for which it was hard to find an unambiguous mapping to vkFormat.

Task-number: QTBUG-75108
Change-Id: I06a7fd8df7d98cef314410ffd79ca9cff6599357
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit b21b07877a)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-06-21 11:19:58 +02:00
Liang Qi
bd9959bde2 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/network/ssl/qsslsocket_openssl.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
2019-06-20 07:50:44 +02:00
Liang Qi
ef37ab9970 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/network/ssl/qsslsocket_openssl.cpp
	src/plugins/platforms/android/qandroidinputcontext.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
2019-06-25 13:04:27 +02:00
Alexandru Croitor
fe3bd212fc Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
This changes many different CMake places to mention Qt6 instead of
Qt5.

Note that some old qt5 cmake config files in corelib are probably not
needed anymore, but I still renamed and kept them for now.

Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
2019-06-14 16:31:09 +02:00
Frederik Gladhorn
a3e69954f5 Add accessibility notification role
On Linux this role is needed to make desktop notifications work.
There is no equivalent for Windows, iOS or macOS. On these platforms the
role will have no effect.

Fixes: QTBUG-76333
Change-Id: I4ef3b3321f7a0e2c09c1ce432a668428d14c52b7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-06-12 10:29:45 +02:00
Simon Hausmann
a6c11d3e09 Add support for private module .pri files
Generate a pri file for public and private interfaces, but map CONFIG +=
internal_module to a cmake option and skip the former if set.

Task-number: QTBUG-75666
Change-Id: I3f4baf1277094f4c22149a9e8769734baf9a235f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-06-05 14:39:11 +00:00
Simon Hausmann
bc9409d857 Re-generate the CMakeLists.txt and add the prev files
Change-Id: I93ea196bdd5807bccebf81e72332966288a35a4f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-06-05 14:20:26 +00:00
Simon Hausmann
38cd18384f Fix OpenGL vs. GLESv2 linkage, attempt number three
We introduced WrapOpenGL to link against either desktop GL or GLESv2
depending on the GL feature in QtGui. This works "fine", with two
caveats:

    (1) find_package(WrapOpenGL) must be called after
    find_package(Qt5Gui) in order for the feature check in
    FindWrapOpenGL.cmake to work. That's error prone.

    (2) More and more places are popping up, in particular examples,
    where GL linkage is required due to inline functions in Qt that
    forward to GL functions - such as on Android.

    This in particular explains the qmake behavior of making the GL
    linkage (desktop _or_ GLES) a public dependency of QtGui, so only
    Gui linkage is required.

Those two aspects combined are the nail in the coffin of FindWrapOpenGL
and it would seem much easier to simply make the Desktop GL vs. GLES
decision once in Gui's CMakeLists.txt and let Qt5GuiDependencies.cmake
propagate this well. This allows us to get rid of plenty of special
cases as well.

Change-Id: I3a7e8af49537ce5f215f24470e075a4ae9aeb944
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-06-05 09:38:02 +00:00
Alexandru Croitor
e4079eca49 Merge remote-tracking branch 'origin/dev' into wip/cmake
Take 5.

Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
2019-06-03 15:14:42 +02:00
Giuseppe D'Angelo
34fe9232db Port from QAtomic::load() to loadRelaxed()
Semi-automated, just needed ~20 manual fixes:

$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} +
$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} +

It can be easily improved (e.g. for store check that there are no commas
after the opening parens). The most common offender is QLibrary::load,
and some code using std::atomic directly.

Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-06-20 20:48:59 +02:00
Laszlo Agocs
e85aa551eb vulkan: Add debug message filtering
[ChangeLog][QtGui] Added support for filtering Vulkan debug messages in
QVulkanInstance. This is especially useful for processing or suppressing
messages from the validation layers.

Change-Id: Idf0d7889085948daf5b1a53d2a9b11081e967609
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-05-28 17:48:04 +02:00
Friedemann Kleint
518cf3312c Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
2019-05-27 15:34:10 +02:00
Friedemann Kleint
761b71bd20 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
2019-05-27 09:17:14 +02:00
Marc Mutz
dca0efc70d QEvdevTouchScreenData: remove use of Java-style iterators
They will be deprecated.

Change-Id: Ic1281ba2543209eb9a4ba8d6653c3a3c537eb830
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-24 08:59:31 +02:00
Eskil Abrahamsen Blomfeldt
922d195020 Fix font matching of typographic families on Windows
9204b8c31e broke font matching on Windows.
This was then attempted fixed by bcd2fa484a,
but this caused an infinite recursion for some cases, so it was reverted
again by 9d1905da9c.

The original issue was that if we populate a specific face of a family,
such as "Arial Black", then the typographic/preferred name will be
detected as "Arial" and this family will be set as populated=true, even
though we have not yet registered any additional subfamilies. In this case,
we need to call populateFamily() for the typographic family name to
ensure we get Windows to enumerate all the subfamilies in that family
before it sets it as populated=true.

But this broke for some fonts where the font naming was unconventional.
In particular, "Yu Gothic" would have its Japanese name as the
typographic name, and there would be no font in the system where
the old-style font family name matched the typographic name. In
that case we would go into a loop where we would try populating
"<Japanese font name>", Windows would translate this to "Yu Gothic", we would
translate it back to "<Japanese font name>", ad infinitum.

In order to avoid the infinite recursion, we add a recursion guard
as well, ensuring that we never call populateFamily() for the main
family we are currently populating.

[ChangeLog][Windows][Fonts] Fixed a bug where it would be impossible
to request different faces of a font family after a specific type face
has been in use.

Task-number: QTBUG-74748
Task-number: QTBUG-74983
Change-Id: Ibe6239f67c45d67ebf75947c8f231cfa177e347f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-23 09:49:10 +02:00
Qt Forward Merge Bot
264e66afb2 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I1bdc28a3ae825ea35e83f20fe16d2409515e5a3d
2019-05-16 01:00:11 +02:00
Frederik Gladhorn
61d990da96 Accessibility: Do not use the session bus if not connected
When there is no DBus session, there will be no Linux accessibility,
since it relies on the presence of DBus.

Fixes: QTBUG-50189
Fixes: QTBUG-51940
Change-Id: I7503011b39ba2a806ddc12e89d0f7bd72a628b64
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-15 16:59:04 +00:00
Eirik Aavitsland
1fd44915f9 Fix: freetype italic fonts in mono/aliased mode
FT_GlyphSlot_Oblique(), the Freetype function to synthesize a
slanted/italic font, only accepts glyphs with outline format. So
disable loading bitmap format glyphs when that function will be used.

Fixes: QTBUG-73586
Change-Id: I762a4bc34537e0725ead0fb063d50c997403143d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-05-15 11:57:31 +00:00
Laszlo Agocs
f6f0a9f3f6 eglfs: Make the logs from atomic support usable
Atomic being supported and atomic being requested are two different things.
(the latter is only true when QT_QPA_EGLFS_KMS_ATOMIC is set)

Log accordingly since this can be very important to know when investigating
problems.

Change-Id: I6947d18e7c0eaef3fe160095cb046770f9c93efe
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-05-14 11:39:43 +00:00
Qt Forward Merge Bot
f8212b87d9 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I0c00ffe0eabebc919f22d6faa4bf958b288e8fd9
2019-05-12 01:00:08 +02:00
Qt Forward Merge Bot
e56d3b03ed Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale_data_p.h
        (Regenerated by running the scripts in util/local_database/)
	src/gui/opengl/qopengltextureuploader.cpp

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
2019-05-09 13:06:11 +00:00
Laszlo Agocs
64a2dc3962 Add missing backslash to kmsconvenience.pro
Change-Id: I3519447af657bdbb7304aca272de416104dca0f9
Fixes: QTBUG-75730
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-05-09 12:55:06 +00:00
Frederik Gladhorn
516ab2a595 Windows Accessibility: Add UI Automation Window provider
This allows closing, minimizing and maximizing the window.

Fixes: QTBUG-74999
Change-Id: I8b3ad806a1767586c8cf7e5a1848fc0e525621cd
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-05-20 13:21:02 +00:00
Tor Arne Vestbø
387691498a macOS: Generate UTF-16 clipboard content without BOM
Qt on macOS has traditionally not included a BOM in the UTF-16 data,
but due to iOS requiring it it was changed in 4e196159. This had the
unfortunate side effect of breaking macOS applications that were not
prepared for the BOM, even if the public.utf16-plain-text UTI can have
an optional BOM, most notably Microsoft Excel. It also resulted in the
public.utf8-plain-text having a BOM, as that's automatically generated
by macOS based on the UTF-16 content we give it. Having a BOM in UTF-8
is technically fine, but not required, and recommended against.

The fact that iOS requires a BOM is a bit dubious, and most likely a
result of applications or system frameworks decoding the data using
NSUTF16StringEncoding, which assumes big-ending byte ordering if there
is no BOM, as opposed to public.utf16-plain-text which assumes native
byte ordering. Since we can't fix iOS our best bet is to include a BOM.

For macOS though, we revert back to the old behavior of not including
a BOM, since that seems to surprise macOS frameworks and applications
the least, even if having a BOM in public.utf16-plain-text should be
fully supported.

Longer term we should look at what kind of UTIs we generate. Most apps
on macOS do not generate public.utf16-plain-text, but instead generate
public.utf16-external-plain-text, which differs from the former in that
it assumes big-endian byte-ordering when there's no BOM. On iOS apps
seem to generate public.utf8-plain-text, and do not generate any UTF-16
UTIs. Moving Qt over to these UTIs would fix the problem as well, but
is a larger change that needs more research.

Change-Id: I4769c8b7d09daef7e3012e99cacc3237f7b0fc1a
Fixes: QTBUG-61562
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-20 13:31:34 +00:00
Alexandru Croitor
9d96c8da78 Fix freetype target not being found when using vcpkg
vcpkg and upstream CMake find module define different target names for
the same package. To circumvent this, create our own Wrap find module,
and link against it. Inside the find module, try both target names.

Change-Id: Iba488bce0fb410ddb83f6414244f86ad367de72b
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-08 10:54:15 +00:00
Marc Mutz
f7ae47ad07 QEvdevTouchScreenData: use a mutex locker instead of manual lock/unlock()
Extra difficulty: the lock is conditional. Not a problem with std::unique_lock, which is movable.

Change-Id: Ib5515838ccb10100d5aa31163ab7f171591c04c4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-05-21 09:07:38 +02:00
Tobias Hunger
aa8af1283f CMake: Do not require ATSPI2 in platformsupport/linuxaccessibility
Change-Id: I3796ab3eb51306eec67460214c20a3c1c160edee
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-07 17:08:47 +00:00
Frederik Gladhorn
eba3b567d6 Accessibility: Improve handling of read-only state
We have been rather sloppy in how read-only versus editable is handled.
According to the definition, editable signifies that in principle a
widget allows the user to change its text. Read-only means that this
ability is (currently) disabled.

Task-number: QTBUG-75002
Change-Id: I5d71843abcdaac52f4a60a1abcac2604341f6c96
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-07 10:05:30 +00:00
Shawn Rutledge
6afdbfdaaf Use "monospace" as fallback system FixedFont in KDE theme; logging
Also de-duplicate the "monospace" string in qgenericunixthemes.cpp,
and add tst_QFontDatabase::systemFixedFont() to verify that
QFontDatabase::systemFont(QFontDatabase::FixedFont) really returns
a monospace font across platforms.  Replace commented-out qDebug()s
with qt.text.font.match and qt.text.font.db logging categories to
troubleshoot when the test fails (among other uses).  Add qt.qpa.fonts
logging category to unix themes to show default system and fixed fonts
(font engines on other platforms are already using this category).

Fixes: QTBUG-54623
Change-Id: I2aa62b8c783d9ddb591a5e06e8df85c4af5bcb0c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-05-07 07:48:43 +00:00
Lorn Potter
050e7bafad wasm: add fixedPitch font
Also define our default font so as to return something we actually have

Task-number: QTBUG-75587
Change-Id: I26e3c62921d369c3017af9796c0a20f7ac06d07c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-07 07:21:58 +00:00
Tobias Hunger
aba911c4d0 CMake: Regenerate src/platformsupport/kmsconvenience
Change-Id: I2608275ca7cd5315e7ffdffbb25f78e98fbf9bc3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:29:11 +00:00
Tobias Hunger
d1a0af9b0c CMake: Regenerate src/platformsupport/platformcompositor
Change-Id: I435fb110ad59eb197401c6d8090c697ceb4cf687
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:28:45 +00:00
Tobias Hunger
b15776c76f CMake: Regenerate platformsupport/windowsuiautomation
Change-Id: I17c927cf7eb8c66ee941a2d91c918e105474da29
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:27:34 +00:00
Tobias Hunger
cbaa8ee27d CMake: Regenerate platformsupport/vkconvenience
This does not link to vulkan, just as it did before. Feels wrong...

Change-Id: I7e76e03e95ed33421de684f51c9943a84dde7779
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:27:24 +00:00
Tobias Hunger
ef170a12d8 CMake: Regenerate platformsupport/themes
Change-Id: Ica4b4c3f2a5f86476f179a01aea5eeb25e617a98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:27:08 +00:00
Tobias Hunger
9b7f5776ee CMake: Regenerate platformsupport/services
Change-Id: I73444aeef2e37ebb2f90e8bae3e6932989bad5f0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:26:58 +00:00
Tobias Hunger
3d452d7c3b CMake: Regenerate platformsupport/linuxaccessibility
Use ATSPI with nolink!

Change-Id: I334fa93364109ca04b4312d12ddcea34d9e9a103
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:26:49 +00:00
Tobias Hunger
5d374083b7 CMake: Regenerate platformsupport/graphics
Change-Id: Ifff85f70de092ade438430d71d9a149f49363c14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:51 +00:00
Tobias Hunger
775e595642 CMake: Regenerate platformsupport/fontdatabases
This one does actually contain functionality changes, but those look OK to me.

Change-Id: I5fd2caee16da86c529e1c83ca66452f780e54e26
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:42 +00:00
Tobias Hunger
f8d3b60fb1 CMake: Regenerate platformsupport/fbconvenience
Change-Id: Ic838debdca48553252cb4c32ec8a42695ba24b46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:28 +00:00
Tobias Hunger
a7fc360b22 CMake: Regenerate platformsupport/eventdispatchers
Change-Id: Ie9cbee3fcb58673c08e8378382dd45e61fc4ff01
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:19 +00:00
Tobias Hunger
46b1676804 CMake: Regenerate src/platformsupport/edid
Change-Id: Id567354daa47c0be07211ebf01f92cd01be9a5c7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:24:06 +00:00
Tobias Hunger
c29fe1fae2 CMake: Regenerate src/platformsupport/devicediscovery
Change-Id: Ia306a7197c10fffb520e90eead449c551f0dfbe8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:55 +00:00
Tobias Hunger
65c5ffdb1d CMake: Regenerate src/platformsupport/clipboard
Change-Id: I6e61274a2f5796a6b4ddcbbdf03c345a03e4b91a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:44 +00:00
Tobias Hunger
f02a9c81ad CMake: Regenerate src/platformsupport/accessibility
Change-Id: Ie250afa3b4dc6c5750dd3cd15c1e83edcb7e0734
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:33 +00:00
Tobias Hunger
59e32c4e23 CMake: Regenerate src/platformsupport
Change-Id: I883573633dbd82ebcca9cc0dc435cd867cec24b8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:23:19 +00:00
Qt Forward Merge Bot
e4e5a1f0b7 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaad9509712c848ed42ada2c25065162a6fc5a930
2019-05-06 01:00:13 +02:00
Nick Shaforostov
4d5fb551d6 fix compilation with various -no-feature-* options
Change-Id: Ic1975db497613e3efe50be4246c167efe10d8e31
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-05 09:14:48 +00:00
Allan Sandfeld Jensen
835c3e94f6 Only call addFontToDatabase once per family,style
We get a call to storeFont for each supported script-type of
a font, but we use the font signature to register all the supported
types at once, and can thus save ~3/4 calls to addFontToDatabase.

Change-Id: I9d06252fb7f805e7babac58d82fa412ec4e0e36a
Fixes: QTBUG-59360
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-05-03 19:22:59 +00:00
Simon Hausmann
c2379c469c Fix linking on systems where there's no libGLX.so but mesa provides bindings
Behave like qmake and link against libGL simply. This happened in
offscreen.pro implicitly through QT += gui-private and needs to happen
explicitly here by using the CONFIG += opengl equivalent: WrapOpenGL.

Change-Id: I396c2256c89f4560bb7f936f7540b33c754b9eda
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-03 08:27:51 +00:00
Simon Hausmann
d3b10dabf2 Revert "CMake: better GLX detection"
This fixes the build when GLX is available.

In the .pro files as well as the .cpp files the condition of enabling
GLX support is based on the Qt feature system (xlib && opengl &&
!opengles2). The change to replace the !opengles check with a cmake
target check is incomplete for two reasons:

    (1) the target check would _never_ succeed because there was no
    find_package() call in scope that would create the target.

    (2) when the target is found, the .cpp code that checks for the
    features would fail, because that continues to use the !opengles2
    condition -- the preprocessor can't know about cmake targets.

So this reverts commit 1361cf5d50 and
instead calls for an investigation why in Ville's machine desktop gl was
disabled.

Change-Id: I9a7957224f81b800282c260dee8abcd421fdbc9e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-05-03 07:51:41 +00:00
Ville Voutilainen
1361cf5d50 CMake: better GLX detection
Change-Id: I71dfbb331cb02a3249b0c3c65f2a9bd9ce68c739
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-02 14:56:32 +00:00
Alexandru Croitor
9b0b464e82 Write find_dependency() calls in Qt Module config files
This change introduces a new function called qt_find_package()
which can take an extra option called PROVIDED_TARGETS, which
associates targets with the package that defines those targets.
This is done by setting the INTERFACE_QT_PACKAGE_NAME and
INTERFACE_QT_PACKAGE_VERSION properties on the imported targets.

This information allows us to generate appropriate find_dependency()
calls in a module's Config file for third party libraries.

For example when an application links against QtCore, it should also
link against zlib and atomic libraries. In order to do that, the
library locations first have to be found by CMake. This is achieved by
embedding find_dependency(ZLIB) and find_dependency(Atomic) in
Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake.
The latter is picked up when an application project contains
find_package(Qt5Core), and thus all linking dependencies are resolved.

The information 'which package provides which targets' is contained
in the python json2cmake conversion script. The generated output of
the script contains qt_find_package() calls that represent that
information.

The Qt5CoreDependencies.cmake file and which which dependencies it
contains is generated at the QtPostProcess stop.

Note that for non-static Qt builds, we only need to propagate public
3rd party libraries. For static builds, we need all third party
libraries.

In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any
scope, the targets on which the property is set, have to be GLOBAL.

Also for applications and other modules to find all required third
party libraries, we have to install all our custom Find modules, and
make sure they define INTERFACE IMPORTED libraries, and not just
IMPORTED libraries.

Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-02 07:30:42 +00:00
Qt Forward Merge Bot
0dff40adf8 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I6ecf7074eda57ef4954fb3fdc7a6d1e8cd229340
2019-04-26 01:00:13 +02:00
Frederik Gladhorn
1269f9cd16 Linux Accessibility: Add missing roles: Terminal and Desktop
There is an effort to make KDE software accessible, which exposed the
missing roles. Check that they are complete with an assert.

Change-Id: Ibaff0a90e1cee316983569ecee7759a13212e3c3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-04-25 10:02:37 +00:00
Qt Forward Merge Bot
cb10ec56f7 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I26da00aa71b0f0b91c9bfb4a9e8550345ee62875
2019-04-24 01:00:13 +02:00
Gatis Paeglis
54ceb8a5f8 qglxconvenience: use QMAKE_USE instead of QMAKE_USE_PRIVATE
The provided API uses Xlib types, so it should publicly link with Xlib.

Fixes: QTBUG-75045
Change-Id: Ifea1e8df27cdcc57fb04cd68a7aa1e9fa339c53d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-23 11:36:22 +00:00
Tobias Hunger
bbb75d9614 Merge remote-tracking branch 'gerrit/dev' into wip/cmake
Change-Id: I2e1812e4f40131ff74919aa3b558db5c261fe412
2019-04-16 16:50:27 +02:00
Tobias Hunger
6630937e63 Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
2019-04-16 16:32:08 +02:00
Michal Klocek
4298658bef Fix corner case in openglcompositor for eglfs
Add 'source' window offset. This covers the cases where platform
window is created besides one full screen window (like for popups),
where content has qquickwidget / qopenglwidgtet. In that case
fbos/textures from those widgets have offset according to 'source'
window. Note backingstore texture has geometry of 'source' window.

Task-number: QTBUG-69533
Change-Id: I2514b36fd3a6b9b86f51999df1c2b3e9565aafde
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-16 12:50:56 +00:00
Liang Qi
9d67bf6e96 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale.qdoc
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
2019-04-16 09:34:50 +02:00
Rolf Eike Beer
093a1a6232 tslib: use ts_setup() to find the device
This automatically searches for some default devices. This not only
reduces the amount of code, it also makes sure that Qt will by default
find the same input devices that tslib (e.g. ts_calibrate) will find.

Fixes: QTBUG-74680
Change-Id: Ied3fff7e8ed9d6637d2b8cf32119660133d251a3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-15 15:14:21 +00:00
Laszlo Agocs
2593463eaf kms: Add support for "skip" key in the output config
"off" is not quite suitable because that turns the output off, as the name suggests.
Disconnected outputs are skipped automatically - it is natural to have a way to
request the same for connected outputs as well.

Task-number: QTBUG-74871
Change-Id: I8bea83428ae0424601b19482b6e6ef809491d0fb
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-04-12 14:02:05 +00:00
Andy Shaw
825b474363 Windows: Use the first entry in the requested families if available
If the font request has the families list set then it should use the
first entry in that if the face name is empty as this will be more
accurate than just the whole family setting which may contain a
comma separated list of family names.

Fixes: QTBUG-75333
Change-Id: Iccc9cde741544af5263cb318da56178adf34299b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-06-05 11:46:00 +02:00
Rolf Eike Beer
e1167ed650 tslib: fix detection of missing release coordinates
The release coordinates may be simply initialized to 0 in lower levels of the
tslib. They are then passed through the calibration stage, which applies
offset and multiplication to them, so they may end up even as positive numbers.
Since we can't know if we can trust them or not simply ignore all release
coordinates and just always use the ones from the previous event.

Change-Id: Ib845b5ab1c5b81967cc089d601576893f433fa4a
Reviewed-by: Martin Kepplinger <martink@posteo.de>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-11 08:28:55 +00:00
wdl
7c74048e94 xcb_egl: Correctly select OpenGL ES render type if user requested
Fixes: QTBUG-74736
Change-Id: I8f01857c81e7a831da659102052ca73c101818cd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-10 08:45:06 +00:00
Friedemann Kleint
bafa676d08 QEglConfigChooser: Silence warning about fallthrough
Add Q_FALLTHROUGH, fixing:
qeglconvenience.cpp:267:9: warning: this statement may fall through [-Wimplicit-fallthrough=]

Change-Id: I764a5821f98982bc94ce5dc6a4efa81a431fd369
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-09 19:46:09 +00:00
Eskil Abrahamsen Blomfeldt
9d1905da9c Revert "Fix font matching of typographic families on Windows"
This reverts commit bcd2fa484a.

There was a report that this caused infinite recursion on some
systems, so we revert it for now and re-add it later when the
issue has been resolved.

Task-number: QTBUG-74983
Change-Id: I747e0437232d72d7a87eb602b10fa09c7130ce8f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-09 06:02:22 +00:00
Allan Sandfeld Jensen
1ef274fb94 Replace qMove with std::move
Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-06 11:00:38 +00:00
Qt Forward Merge Bot
ed485243b5 Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev 2019-04-04 23:01:17 +00:00
Allan Sandfeld Jensen
8d7c97d428 Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usage
Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-04 18:01:38 +00:00
Eskil Abrahamsen Blomfeldt
bcd2fa484a Fix font matching of typographic families on Windows
9204b8c31e broke font matching on Windows.
After this change, if you request a specific face of a family, such
as "Arial Black", and Qt detects that its typographic/preferred name
is "Arial", then it will be added as the single style of the Arial family,
which will in turn be set as populated=true.

So if you later request a regular font of "Arial" family, then it will
see that the family has already been populated, skip this step, and
then see that there is only one style available, i.e. "Arial Black".

To work around this, we need to make sure the typographic family is
properly populated the first time it is registered.

[ChangeLog][Windows][Fonts] Fixed a bug where it would be impossible
to request different faces of a font family after a specific type face
has been in use.

Task-number: QTBUG-74748
Change-Id: Ia0caace2b88a32e6114ff23ad10ee1ea8f5a3e03
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-04 10:24:57 +00:00
Tobias Hunger
1aff970c49 CMake: Re-generate platformsupport/clipboard
Change-Id: If05ae02f363a4a9ef6193f7f8822dcbbc58e1738
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-03 08:53:21 +00:00
Alexandru Croitor
e2e4525f78 Fix simplification of conditions involving apple
Previously a condition like APPLE AND (NOT APPLE_OSX) got simplified
to APPLE, which is wrong.

This happened by accident due to some sub-family simplifications
involving BSD, which APPLE was part of.

Technically APPLE is BSD derived, but for the purposes of the
conversion script consider APPLE not to be a BSD (hopefully there
should be no cases of using the bsd scope for apple machines in
qmake files.

Also regenerate the fontdatabase project, where the issue was found.

Change-Id: I18dcf4f29ffbff48c183ba95ca2a2e5cd5325d86
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-02 13:32:21 +00:00
Liang Qi
29f01b32f5 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/configure.json

Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
2019-03-31 12:39:42 +02:00
Qt Forward Merge Bot
0a7302abbc Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9935bacae0d6ba532418fc3d28adbc7ca1463604
2019-03-30 01:00:07 +01:00
Tobias Hunger
4a9ea61705 CMake: Re-generate platformsupport/graphics
Change-Id: Ib144f7ab7d73e408fb73e1c52e92d03377c890c5
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:33:22 +00:00
Tobias Hunger
ff15f36812 CMake: Re-generate platformsupport/glxconvenience
Change-Id: I1a8c376df4a29ca6d38f60b20a961a8706f246ba
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:33:10 +00:00
Tobias Hunger
4cf7ec0665 CMake: Re-generate platformsupport/platformcompositor
Change-Id: I4efe3cc2920c0efe83f8e2b7028020558a78c778
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:33:00 +00:00
Tobias Hunger
b7d3bb8c3a CMake: Re-generate platformsupport/eglconvenience
Change-Id: I0e159dad3efc812be7fad7637901822f9a29fb88
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:50 +00:00
Tobias Hunger
95142af5bd CMake: Re-generate platformsupport/kmsconvenience
Change-Id: If0d734f80f3c6252c6cd7dedcba77352ee909178
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:39 +00:00
Tobias Hunger
49777d0d4f CMake: Re-generate platformsupport/vkconvenience
Change-Id: I231274316f1cd834ec6d34e51231829dd825643b
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:30 +00:00
Tobias Hunger
3b362e766f CMake: Re-generate platformsupport/windowsuiautomation
Change-Id: I5c422b0052af0570de4331215fe78a7e956649e9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:32:20 +00:00
Tobias Hunger
eb1e744206 CMake: Re-generate platformsupport/fontdatabases
Change-Id: I20e7043c77fbbbd882d6bf8cb0a05dfb32eb2ede
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 14:31:57 +00:00
Tobias Hunger
feeae8e27f CMake: Re-generate platformsupport/linuxaccessibility
Change-Id: I1737fbfbdb3a139a9296cc0b446014b3aaa583a1
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:17:22 +00:00
Tobias Hunger
71125665cf CMake: Re-generate platformsupport/accessibility
Change-Id: I3d29bc6db570d918dee5925ac370c4dd2cc16aa8
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:17:03 +00:00
Tobias Hunger
dc0b1dc67c CMake: Re-generate platformsupport/input
Change-Id: I4f3c4d6d0db2cb8d5a4cb2b71a7d7e08f043b88c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:16:53 +00:00
Tobias Hunger
fdb480c8e3 CMake: Re-generate platformsupport/services
Change-Id: Ibe7d56e81640a41e093cf4936207fa96fd61a4f9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:16:21 +00:00
Tobias Hunger
43ff4aa5b8 CMake: Re-generate platformsupport/fbconvenience
Change-Id: I8cf1ac15e38529117346fdd17f29fb1e6be20a68
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:16:03 +00:00
Tobias Hunger
143c3e6ea1 CMake: Re-generate platformsupport/devicediscovery
Change-Id: I817532202f070120498894b0b1dd9d92fc4e1bfa
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:15:53 +00:00
Tobias Hunger
63389cad18 CMake: Re-generate platformsupport/eventdispatcher
Change-Id: Ib2c502cc4f2e7b91304ec4d0b4f1702327890dfb
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:15:36 +00:00
Tobias Hunger
8d4a15c68f CMake: Re-generate platformsupport/edid
Change-Id: Ib043c387a67b0a05448fe5a9bf0ef6adbbfd369f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:15:22 +00:00
Tobias Hunger
337c06b1d8 CMake: Re-generate platformsupport/themes
Change-Id: I5310b5a399bf8078193b2218aebc07096446e83f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-29 10:15:14 +00:00
Rolf Eike Beer
a2fda801cc tslib: initialize members in declaration
Change-Id: I887d0c82a4819712ea3d908df745516186aa76f0
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-03-27 15:37:12 +00:00
Rolf Eike Beer
958fa04327 tslib: use new connect syntax
Change-Id: I06bbd681fbb4bf809814de454c266f08976e0916
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-03-27 15:36:57 +00:00
Rolf Eike Beer
93466daf13 tslib: avoid deprecated overload
Change-Id: Iab0c25c38d62303986a1f5739cc48de15b35dea2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-03-27 15:36:43 +00:00
Eirik Aavitsland
e20f4d966e Fix stretched fonts with large pixel size
The Windows and Cocoa font engines ignored the stretch factor when
the pixel size is so large that QPainterPath rendering is used
instead of native.

Fixes: QTBUG-14315
Change-Id: I93390528ac264452b7d6af7d39f49f4b0dd56279
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-03-27 08:17:25 +00:00
Friedemann Kleint
7f635d9777 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I38389a69411f4549fed432f1181dbe23398b34a2
2019-03-26 08:24:59 +01:00
Gatis Paeglis
4d11fc1d22 qxkbcommon: use QMAKE_USE instead of QMAKE_USE_PRIVATE
... because API from qxkbcommon_p.h includes xkbcommon headers.
When we use "QT += xkbcommon_support-private" in *.pro files, we
should not explicitly require "QMAKE_USE += xkbcommon" in those
projects.

Change-Id: I21049034ce93bee13a1107723f26498c221f8ea4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-03-25 13:49:46 +00:00
Qt Forward Merge Bot
19510477b4 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ie7f68dcd5650e0037b6c3313cc9ffdcd7c494fbe
2019-03-21 01:00:07 +01:00
Allan Sandfeld Jensen
24358aaf72 Handle when XVisuals lose the alpha channel of the FBConfig
Sometimes the XVisual for an FBConfig have no alpha data, and thus
won't work when an alpha channel is required.

Fixes: QTBUG-74578
Change-Id: Idf05cbfcaea5edf667035939e9bc5d5df2172eec
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-03-20 14:49:58 +00:00
Alexander Volkov
7c506150a5 Force font antialiasing with highdpi scaling
Fonts look ugly when they are drawn scaled without
antialiasing.

Change-Id: I64268db5b37d4bc763ffa23632aca2eaac5d8eae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-03-20 10:16:50 +00:00
Marc Mutz
779f1ff9fa QEvdev: remove m_deviceDiscovery members
They were never referenced outside the classes' ctor and, worse,
remained uninitialized if the specification string contained devices.

Change-Id: I977a156acf10190428da00fe128fee70cff8f98d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-13 08:48:26 +02:00
Marc Mutz
f1404c0ed1 QEvdev: Extract Method parseSpecification()
All four manager classes contained roughly the same code in their
ctors that parsed out devices from a colon-separated string.

Extract shared code, and port the parsing to QStringRef (later to be
ported to QStringView).

Saves ~2.4KiB on optimized Linux GCC 9.1 AMD64 builds across all
.so's that link to libQtInputSupport.a.

Change-Id: I3db826ee2b422cfc02f8d49bd21985a03b6c0935
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-13 08:48:26 +02:00
Marc Mutz
3bc10fb9bb QEvdev: Replace manual memory management with unique_ptr
Make create() return, and m_mice/m_keyboards/etc store, handlers by unique_ptr.
In most cases, we can't use qt_make_unique(), since the ctor we're calling is
marked as private.

Since QHash can't hold move-only types, use a std::vector<{QString, unique_ptr}>
instead. As this pattern repeats in all four QEvdev*Manager classes, create a
small class template.

Saves almost 6KiB on optimized Linux AMD64 GCC 9.1 builds across all .so's that
link to QtInputSupport.a.

Change-Id: I8f62b6b629d6e1855314c0a4fb4fc069db9ae0ce
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-06-12 13:43:52 +02:00
Marc Mutz
cbd5a2dcb8 AtSpiAdaptor: eradicate remaining Q_FOREACH loops
... and replace them by C++11 range-for loops.

Change-Id: I6975121f606ec1fcda7a624b02a68edf829bb70b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-06-13 22:53:04 +02:00
Marc Mutz
3f5d27bfda QEvdev: Extract Method updateDeviceCount()
The code is noisy and repeats, so wrap it in a function.

Change-Id: I5e6e924e22b0bc631eb8176de96c49066b1c9029
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-06-11 23:30:05 +02:00
Andreas Hartmetz
486c55d743 constify, and micro-optimize not detaching
Change-Id: I08c3c35e27a2b5e816a1532d0bd7cc09459800ab
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-06-10 14:44:26 +02:00
Liang Qi
b1a216649e Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/unix/unixmake2.cpp
	src/corelib/thread/qthread_unix.cpp
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
2019-06-14 13:45:18 +02:00
Marc Mutz
0ad5e16268 QEvdev: use printf-style qCDebug()/qWarning()
Also use qUtf16Printable() and qErrnoWarning (removing explicit errno, where
present).

Saves 6.6KiB in text size on optimized Linux AMD64 GCC 9.1 build across
all .so's that link to QtInputSupport.a.

Change-Id: I1def2cfabd2eed65390099cd1d06f8061a9355be
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-11 21:38:47 +00:00
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
Kevin Funk
41e7b71c41 More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.

Skipping src/3rdparty, examples/, tests/

Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-14 07:37:52 +00:00
Qt Forward Merge Bot
261c0dedac Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I056b658ffe9390dfcbe2787e2bddc7f4e9b389dd
2019-03-09 01:00:55 +01: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
Liang Qi
2add2dbdaa Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/network/access/http2/hpacktable_p.h

Change-Id: Ie0c296667dfdebba84f4858056a1ac80c24ee7df
2019-03-06 12:31:50 +01:00
Thiago Macieira
f5cbd61f92 XDG Portal: quick optimization to avoid dup/close of a file descriptor
Just gift it to QDBusUnixFileDescriptor.

Change-Id: Ifa822ecdaaa241968ed7fffd158799041653cf78
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-03-05 17:59:02 +00:00
Thiago Macieira
1bd3c17c46 XDG Portal: allow the portal not to be running
For some reason, it may be missing with SNAP.

Fixes: QTBUG-74112
Change-Id: Ifa822ecdaaa241968ed7fffd1587966cbd30dcbd
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-03-05 17:58:52 +00:00
Christian Ehrlicher
f8f592d5c2 QString: mark obsolete functions as deprecated
Mark obsolete functions in QString as deprecated so they can be removed
with Qt6:
 - QString::sprintf()
 - QString::vsprintf()

Change-Id: I9b7748db95291c34b95ff3ad3e3aabc8215aeaae
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-04 16:54:04 +00:00
Qt Forward Merge Bot
84e15d6f48 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ic0037eac1d85a0e60e7b1a590d49b5ee6205bfc8
2019-03-03 01:00:25 +01:00
Gatis Paeglis
2065bc070d platforminputcontexts: use libxkbcommon compose key API
Our implementation of compose table parser was added on Mar, 2013.
libxkbcommon added APIs for the same thing in Oct, 2014 (ver: 0.5.0).
After removing RHEL 6.6 from the list of supported platforms we were
able to move the minimal required libxkbcommon version to 0.5.0. Now
we can use the xkbcommon-compose APIs on all supported platforms.

With this patch we can drop nearly 1000 lines of maintenance burden.
This patch fixes user reported issues with our implementation.

Known issues:

- Testing revealed that xkbcommon-compose does not support non-utf8 locales,
and that is by design - https://github.com/xkbcommon/libxkbcommon/issues/76
Our implementation did work for those locales too, but it is unclear
if anyone actually uses non-utf8 locales. It is a corner case (work-arounds
existing) and likely a configuration error on the users' system.

- Looking at the release notes for versions above 0.6.1, only one issue
that stands out. Compose input does not work on system with tr_TR.UTF-8
locale, fixed in 0.7.1. Compose input works fine when using e.g. en_US.UTF-8
locale with Turkish keyboard layout.

Note:

With Qt 5.13 we have removed Ubuntu 16.04 and openSUSE 42.3 from CI:

Ubuntu 16.04  - 0.5.0
openSUSE 42.3 - 0.6.1

CI for Qt 5.13 has:

Ubuntu 18.04  - 0.8.0
RHEL-7.4      - 0.7.1
openSUSE 15.0 - 0.8.1

Currently the minimal required libxkbcommon version in src/gui/configure.json
is set to 0.5.0, but we could bump it to 0.7.1 to avoid known issues from above,
but that is a decision for a separate patch.

[ChangeLog][plugins][platforminputcontexts] Now using libxkbcommon-compose
APIs for compose key input, instead of Qt's own implementation.

Fixes: QTBUG-42181
Fixes: QTBUG-53663
Fixes: QTBUG-48657
Change-Id: I79aafe2bc601293844066e7e5f5eddd3719c6bba
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-03-01 14:31:37 +00:00
Gatis Paeglis
a34e81ab8b platformsupport/input: add xkbcommon utilities lib
xcb/eglfs/wayland - all use XKB keyboard configs and APIs. There
is a lot of duplicated and naturally a diverging code. This patch
adds a helper library to avoid all the mentioned problems and unify
feature set between these platforms.

qlibinputkeyboard:

Added a fixup for 2803cdf758. From
spec: "keysyms, when bound to modifiers, affect the rules [..]",
meaning we can't look at keys in isolation, but have to check if
bounding exists in the keymap. This is done by using
xkb_state_mod_name_is_active() API, but that API has its limitations -
https://github.com/xkbcommon/libxkbcommon/issues/88
I will fix this separately in the LTS (5.12) branch.

We need to read the modifier state before the key action. This
patch fixes a regression introduced by aforementioned patch, which
caused modifiers being reported wrongly in QKeyEvent::modifiers().

qtwayland:

Moved toKeysym(QKeyEvent) from qtwayland repository into this library.
For this and other key mapping functionality wayland was duplicating
the key table. All of that will be removed from qtwayland, and calls
will be replaced to use this lib. Adjusted toKeysym() to fix QTBUG-71301.
Qt keys don't map to ASCII codes, so first we need search in our key
table, instead of mapping from unicode.

lookupStringNoKeysymTransformations():

fixed off-by-one error, where we were including terminating NUL in
QString.

Fixes: QTBUG-71301
Task-number: QTBUG-65503
Change-Id: Idfddea5b34ad620235dc08c0b9e5a0669111821a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-03-01 14:31:28 +00:00
Qt Forward Merge Bot
c6fc2bc3e2 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I14eaabe98845445a9ea5266872cc1797786cfe04
2019-02-27 01:00:45 +01:00
JiDe Zhang
c93670c5a0 QGenericUnixTheme: use QStandardPaths get the xdg data path
The corresponding interface is already provided in QStandardPaths.
We should use QStandardPaths::GenericDataLocation instead of the
environment variable XDG_DATA_DIRS.

Change-Id: I0e89e8c86d629585ec7d9a12989f24335aa6e3ba
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2019-02-25 20:12:59 +00:00
Robert Loehning
85b0ce8ca3 Fix can not -> cannot
Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-02-25 13:03:45 +00:00
Liang Qi
c0359bd3c3 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/global/qfloat16.cpp
	src/corelib/global/qfloat16.h
	src/plugins/platforms/windows/qwindowswindow.cpp

Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
2019-05-15 07:11:41 +02:00
Giuseppe D'Angelo
9108a5b005 GLX convenience: fix typo
The code meant to extract GLX_SAMPLE_BUFFERS_ARB, not GLX_SAMPLES_ARB,
which is read a few lines below.

Change-Id: Id50a1863cab56ed6084d4a2359a956a9db1222fa
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-13 22:05:11 +00:00
Liang Qi
388fe97f2a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/tools/qstring.cpp

Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
2019-05-13 08:04:58 +02:00
Joerg Bornemann
ce1830fd21 Migrate Windows system libs to external dependencies
Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-08 08:30:02 +00:00
Liang Qi
c2b553784d Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/kernel/qobject.cpp
	src/corelib/kernel/qvariant.h
	src/corelib/tools/qlist.h

Done-With: Milian Wolff <milian.wolff@kdab.com>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
2019-05-07 11:58:30 +02:00
Lars Knoll
343528841e Prefix textstream operators with Qt::
As the non prefixed variants are deprecated

Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:02 +00:00
Qt Forward Merge Bot
03f7d0a005 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I1c9449ab064deed1367a7e5dbedfcb489f28140e
2019-04-27 01:00:11 +02:00
Johan Klokkhammer Helsing
b21b07877a Add a QVkConvenience class with vkFormatFromGlFormat
Converts from OpenGL formats to Vulkan formats.

There are commented out lines for the formats in QOpenGLTexture::TextureFormat
for which it was hard to find an unambiguous mapping to vkFormat.

Task-number: QTBUG-75108
Change-Id: I06a7fd8df7d98cef314410ffd79ca9cff6599357
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-24 11:40:51 +00:00
Liang Qi
dc37318684 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/gui/util/qshaderformat.cpp
	src/gui/util/qshaderformat_p.h
	src/widgets/graphicsview/qgraphicsitem_p.h

Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
2019-04-24 09:52:30 +02:00
Alexander Kanavin
7d646508c8 libinput: add support for LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE
This is required to get Qt EGLFS in qemu working, as qemu mouse
device issues only absolute mouse events.

Fixes: QTBUG-69172
Change-Id: Ia9985dc01d7871fdcd856c14160d54d3ce684396
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-04-23 06:24:48 +00:00
Samuel Gaist
e2906ea5c4 QRegExp include cleanup
QRegExp includes can be found in several files where there's not even a
use of the class. This patch aims to avoid needless includes as well as
follow the "include only what you use" moto.

This patch removes a QRegExp include from the QStringList header which
means that there is likely going to be code breaking since QStringList
is used in many places and would get QRegExp in.

[ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no
longer includes qregexp.h.

Change-Id: I32847532f16e419d4cb735ddc11a26551127e923
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-19 21:21:17 +00:00
Qt Forward Merge Bot
035f934d7a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp

Added tests/auto/testlib/selftests/expected_crashes_5.txt to work
round the output of the crashes test (which exercises UB, see
QTBUG-73903) being truncated on one test platform.

Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
2019-02-20 09:51:12 +01:00
Qt Forward Merge Bot
ef2ddcf551 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I8cad26f17834dbc9f7151edc0f17786f9e32025d
2019-02-15 01:00:51 +01:00
Andy Shaw
a34077ceac Windows: Freetype: Load fonts from the user locations
Since Windows 10 update 1809 it is possible to install fonts as a user
so they are only available for use by the user and not on the system.
So this location in the registry needs to be checked as well when
looking for available fonts.

Fixes: QTBUG-73241
Change-Id: I5d808e38b80dde8189fe8c549a6524bd559e30c7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-14 07:39:06 +00:00
Eskil Abrahamsen Blomfeldt
736cc1d564 Don't wrongly detect fonts as oblique
We were interpreting bit #8 as the oblique bit, but this is the
WWS-conformity bit. Bit #10 is the oblique bit.

[ChangeLog][Windows] Fixed an issue where loading fonts from files or data
would sometimes mistakenly classify them as oblique.

Fixes: QTBUG-73660
Change-Id: Id9e5012d1b89d0bee0e966c5105657b38834e13a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-02-13 13:28:36 +00:00
Dominik Holland
df2b76046d eglfs: Add vsync support when using NVIDIA eglstreams
Similar to the kms backend a flip event handler can be retrieved using
the drmEvent API to implement vsync.
For this to work the acquire calls need to be done manuallly and the
automatic acquiring needs to be disabled.

Change-Id: I670d288ef68eb49846108db2a31993c6167d9313
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-12 15:10:28 +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