Commit Graph

42771 Commits

Author SHA1 Message Date
Lars Knoll
e1fd607493 Remove leftovers from QML1
QML1 is not supported anymore, remove the leftover hooks for it.

Change-Id: I2900726714c5faea3523b2ebe39bb393364b3bfb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-10-10 11:28:19 +02:00
Leander Beernaert
f863bf7d64 Add XML tests
Initial conversion of XML tests.

Change-Id: I47256d4d87dad106b04be2c2e1abc9ef070be973
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-10 09:02:43 +00:00
Frederik Gladhorn
3a9bca6574 cmake scripts: when writing resources, replace OUT_PWD
Needed in tests/auto/corelib/plugin/qfactoryloader/test/ for example.

Change-Id: I5a2904e25d2895355fe11d4fc3e2e7c742346e42
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-10 07:17:41 +00:00
Liang Qi
9c84b7786c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/plugins/platforms/xcb/qxcbscreen.h
	src/src.pro

Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
2019-10-10 09:13:49 +02:00
Qt Forward Merge Bot
68375b4f3d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iadeca81f499d6b19e86ceae1edd7960db2575e90
2019-10-10 09:10:27 +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
Giuseppe D'Angelo
22891dd897 Explain an usage of volatile
It's to work around QTBUG-45307.

Change-Id: Ib6076223013e5b1ccfa6ec25e2d040daaa2f19dd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-10-09 22:39:52 +02:00
Volker Hilsheimer
0e12c8b020 Remove deprecated PE_IndicatorViewItemCheck and PE_FrameStatusBar
They have been marked as deprecated since 5.13, and can be removed
from Qt 6 codebase, which silences the respective compiler warnings.

Change-Id: I3443c7bfa8db148b0b48957e2adc5eb131197faf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-10-09 19:05:21 +02:00
Robert Loehning
d6734e8ab7 Fuzzing: Don't copy input data to QByteArray
Change-Id: I603413805dca46a85709c2ab6ff573687849572e
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-10-09 17:16:09 +02:00
Timur Pocheptsov
5e7365573e Remove a new-line
that was accidentally introduced this week.

Change-Id: I0731c7c64e51b40f230b42694603056d89a05712
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
b62b80706e rhi: Autotest for rendering a triangle into a window
Change-Id: Id1562ff8cf7c6bc7e5bd147bb628f3d9dd57f2b5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
df0b1836b5 rhi: Autotest rendering with uniform buffer
Change-Id: I4251f31494680c78e90a08a2b471cb1af08ecd81
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
b2de7f8583 rhi: Autotest rendering a textured quad
Task-number: QTBUG-78971
Change-Id: I0e7e0f3c00f9509031f7b4a8a389e51c915f01c2
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
8f44da1f55 rhi: Enable the qrhi autotest on WinRT
There is no onscreen support for WinRT in the D3D11 backend yet.
However, offscreen operations (rendering into a texture) should work.
One catch is that there is no D3DCompile available for deployed WinRT
apps. So ship the intermediate format (DXBC output from fxc) in the
.qsb files.

Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
59604405c9 rhi: Fix non-base level copy and readback wrt source size
When the source size is not explicitly specified, we take the entire
subresource. However, just using the texture's size is wrong: when the
source level in a copy or readback is not 0, the size for the corresponding
mip level has to be used instead.

This fixes occasional crashes with Metal in the autotest.

Change-Id: I99f689feef93ec86dffdc9e82d6bfdaf5c1eb041
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
dd105fab8d rhi: Autotest rendering a triangle
Also improve (docs and runtime checks) and test the minimum set
of required data to create a graphics pipeline.

Task-number: QTBUG-78971
Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
9baf69c765 rhi: gl: Add a feature flag for reading back non-zero mip levels
The joys of "level - Specifies the mipmap level of the texture
image to be attached, which must be 0." for glFramebufferTexture2D
in OpenGL ES 2.0.

Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
32924110ce rhi: gl: Switch GetBufferSubData emulation to MapBufferRange
Use only APIs that are in GLES 3.0.

glMapBuffer() is an old OES extension, stop bothering with that.
Not the least because ANGLE claims supporting it and then fails the
map. (not that we care much about ANGLE, but, for instance, the qrhi
autotest is run with ANGLE configurations as well in the CI, so have
to still take care of it for the duration of Qt 5.x)

Change-Id: I29140402cedffe0430f920ee0c061673257c3aa1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
9c466946d0 rhi: Autotest basic texture operations
...and make the Null backend able to deal with these, for RGBA8 textures
at least. Naturally it is all QImage and QPainter under the hood.

Also fix a bug in the OpenGL backend, as discovered by the autotest:
the size from the readback did not reflect the mip level.

Task-number: QTBUG-78971
Change-Id: Ie424b268bf5feb09021099b67068f4418a9b583e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
e22399af82 Make QRhi::create() return false when there is no MTLDevice
The interesting part here is that sending messages to a null
object is valid in Objective-C, so without an explicit check it
is not necessarily straightforward to discover that we do not
have working rendering. (because the application won't just
simply crash)

Do the right thing now and return false like other backends do.

Task-number: QTBUG-78994
Change-Id: I0d3c4a49a3fc78f9149f8af4fe67d581e74daae7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
89ec1b3618 rhi: Add support for buffer readbacks
This also marks the beginnings of significantly extending autotesting
of the resource and rendering functionality in QRhi.

Also involves fixing up the buffer operation lists like we did
for textures before. This is to ensure updates and reads on the
same batch execute in the correct order. So just have two lists:
one with buffer, one with texture operations.

Also simplify the struct layouts. No need for those inner structs
with many duplicate members. This reduces the size even, since using a
union was never an option here. Also switch to a VLA, the size is around
253 KB per batch.

The Null backend now keeps track of the QRhiBuffer data so it can return
valid results in readbacks.

Task-number: QTBUG-78984
Task-number: QTBUG-78986
Task-number: QTBUG-78971
Task-number: QTBUG-78883
Change-Id: I9694bd7fec523a4e71cf8a5c77c828123ebbb3bd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 15:15:05 +00:00
Laszlo Agocs
4a3ee77f65 rhi: Exercise nativeHandles() in qrhi test
Task-number: QTBUG-78971
Task-number: QTBUG-78972
Change-Id: Ibce10caf1ccd74ae7efead9579f4a4342ef896b8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Leander Beernaert
4691b4fbae Use regular -framework for examples
Do not replace framework libraries in examples as they tend to use only
system level frameworks.

Change-Id: Ide604b3ecc90f1f4c81b9ddaaa8e0a5acb486080
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-09 14:40:03 +00:00
Thiago Macieira
780137d585 QRandom: add support for RDSEED
The Intel whitepaer[1] recommends using the RDSEED over RDRAND whenever
present. libstdc++ from GCC 10 will also use it in std::random_device.

[ChangeLog][QtCore][QRandomGenerator] The system() random generator will
now use the RDSEED instruction on x86 processors whenever available as
the first source of random data. It will fall back to RDRAND and then to
the system functions, in that order.

[1] https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide

Change-Id: I907a43cd9a714da288a2fffd15bab176e54e1975
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-09 07:31:28 -07:00
Milian Wolff
63a3b26b6b Fix QMake build system to support trace points in a cross-compiled build
CONFIG(cross_compile) implies CONFIG(force_bootstrap). The latter is
errorneously used within qt_tracepoints.prf and to decide when
tracegen is to be build.

For the tracepoints, we just need to check if etw/lttng trace points
are enabled.

For tracegen, we don't need to check anything - it doesn't depend
on etw or lttng, it is just a code generator similar to moc or rcc
and should be handled like these tools.

Change-Id: I3784b37db10680efd0ed7ee7860059bdf62b4118
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-09 16:20:08 +02:00
Milian Wolff
2d7ec5922a Fix compile with tracing enabled: include QStringList header
Change-Id: I40f737338d10a871442bb453fe1eeede9dacec79
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-09 16:19:17 +02:00
Lars Knoll
ba26496647 Don't crash when calling jumpToFrame() on an empty QMovie
Properly return an invalid frame when calling jumpToFrame()
with a non existent frame number.

Fixes: QTBUG-79029
Change-Id: Ic40f4a6de3106fab42c0bb6c961194be47b04e31
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-10-09 15:58:26 +02:00
Lars Knoll
8c092570fc Fix warning about out of bounds access in QString::operator[]
Fixes runtime warnings that got triggered by change
c2d2757bcc.

Change-Id: I50620b179de8608f45d6f2ef053eeb8b1e10ae43
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-09 15:58:08 +02:00
Leander Beernaert
decce2cd76 Extract public/private libraries from scope for Examples
Public/public libraries were always processed from the global scope.

Change-Id: I1223f04f100f91790ced1da41fda2fb9b52c5987
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-09 12:15:13 +00:00
Leander Beernaert
5484629f2b Add scope conditions for examples
Update example conversion to process scopes and conditions.

Change-Id: If1bbbd25092a8d5371b2d1fa2830d91e5aa591c5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-09 11:59:25 +00:00
Frederik Gladhorn
c0618eb583 cmake scripts: Do not add empty child conditions into condition list
c.condition can be None, there is no point in adding it into the set of
conditions.
An example is tests/auto/corelib/codecs/qtextcodec/test.pro

Initializing the set to an empty set instead of None makes mypy happy,
since we could otherwise end up passing None where frozenset was expected.

Change-Id: If88a86d810b4c55aae7f1ee97a62db559abfc86d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-09 11:30:30 +00:00
Frederik Gladhorn
03f365f93e cmake scripts: fix conversion of qmldir files
I broke the depends in 3a103b3608 wrongly
assuming it was dead code. Bring it back and actually fix the type to be
a list of tuples.

Change-Id: I96f04843ff2e2293969b5ba0efe02fb51dc88404
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-09 11:19:25 +00:00
Leander Beernaert
af7b0534c6 Correct Examples install directory
Set the example install directory based on the path specified in
target.path qmake property.

Change-Id: Ia791995a3241fbf2f5ea1e48f2b9f93a90f1c3d7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-09 10:31:31 +00:00
Alexandru Croitor
87ba355d95 Fix automatic plugin importing in static builds
QtPlugins.cmake.in uses file(GENERATE) and target_sources() to
propagate the generated cpp files which contain plugin initialization
code to their consuming targets.

Unfortunately due to a bug in CMake, if the file is generated in a
different scope than the consuming target, the CMake generation
step will fail saying that the source file can not be found.
See https://gitlab.kitware.com/cmake/cmake/issues/18399 for details.

In the case of qtdeclarative, find_package(Qt6) is called at the top
level scope (this is when the file gets generated),
but the targets are created in subdirectory scopes, and the GENERATED
source file property is not propagated across scropes.

Circumvent the issue by instead using file(WRITE) and configure_file()
which create the file at configure time rather than generate time.

This will pollute the current binary directory with some more files,
but at least successfully fixes the build.

Change-Id: I3ab3b12dcbf6a9d0ab9ee87173e4a1952325b37b
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-09 09:22:27 +00:00
Edward Welbourne
61ec1abc08 Suppress deprecation warnings on a test of a deprecated QString method
QString::fromAscii() is deprecated since 5.0 but still tested.
So suppress deprecations for its code.

Change-Id: Ic048a843c43551021da39a16d94c3222201573dc
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2019-10-09 11:18:22 +02:00
Frederik Gladhorn
f959882616 cmake scripts: more type cleanup
Change-Id: Ic32394548bb997af96756f260b453e830d8b9e9b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-09 09:14:19 +00:00
Frederik Gladhorn
3a103b3608 cmake scripts: fix type issues
Some of the changes are just cosmetic, but a bunch of them must be bugs,
such as mixing lists and str randomly.

Change-Id: Idd8340e17bcea7af3b87e595e251e13f5df1aa3f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-09 09:13:44 +00:00
Jean-Michaël Celerier
d1542e8a73 Match qt_import_plugin API with qt5's
Some work was needed to make the plug-in types,
and which plug-ins are available for each type
in client code.

Change-Id: Ib71feca31069deca3d3f54c8613054f5f8ae410c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-09 09:05:39 +00:00
Kai Koehne
a1ea498789 configure: Do use pkg-config --libs for static libs
This ensures that also linker commands like -pthread are returned.

Fixes: QTBUG-77159
Change-Id: If9ab3797ccfb52c6b96a4ab120c59fd8896d5466
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4ddc50c0cd16ddd146ea9ea21d6565c8f4a5e2bc)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-10-09 07:27:14 +00:00
Timur Pocheptsov
b7a915398a QAuthenticator - use GSS framework, as Apple requires
since declarations in gssapi.h are marked as deprecated.

Fixes: QTBUG-78810
Change-Id: I241ae4913f362f6e9219438e9bfe7a63dfc91b7c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-09 06:08:19 +02:00
Tor Arne Vestbø
9115c7ae45 qmake: Avoid writing glue project file when only generating prl files
When qmake is run with -prl we don't need to write the glue makefile,
and doing so will end up with MakefileGenerator::writeProjectMakefile
trying to write to an invalid Option::output, resulting in warnings:

  QIODevice::write device not open

Change-Id: I196b185570e7329c621c2ccb8530b43f4be51ee6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-09 02:10:03 +02:00
Qt Forward Merge Bot
74858dc4af Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I03d82c5bc47908a97e7a908d7e67a7301b28d8cb
2019-10-09 01:00:42 +02:00
Volker Hilsheimer
0683de205f QtConcurrent: fix warning about function parameters shadowing class members
No functional change.

Change-Id: I76aa01e8eb044c794d518ca72e6861cf95060dfc
Fixes: QTBUG-79071
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-08 23:21:14 +02:00
Volker Hilsheimer
00e8f044e1 QWidget: document that a widget might only get a mouseDoubleClickEvent
If two widgets are on top of each other, and the top widget disappears
in response to a press or release that is followed by a double click,
then the widget at the bottom only receives the double click event.

This is a sequence of events that the application developer that choses
to build such a UI has to take care of.

Change-Id: I440efd2cac01631de8995abf9a9fb76815de8f9a
Fixes: QTBUG-61173
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-10-08 23:20:39 +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
Frederik Gladhorn
b7adc85642 cmake scripts: do not redefine built-ins
Try not to override built-ins, the code becomes confusing to editors and people.

Change-Id: I9e9421e1506a206551ccfc550f882a075e208181
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-08 19:25:20 +00:00
Alex Henrie
ca81c884f8 Include XDG font locations in QStandardPaths::FontsLocation on Linux
~/.fonts was deprecated in 2012, see
https://wiki.archlinux.org/index.php/Font_configuration#Fontconfig_configuration

Few people keep fonts there anymore.

Change-Id: Ide048e1df2c2db4856a38c574df36663ab684f89
Reviewed-by: David Faure <david.faure@kdab.com>
2019-10-08 12:42:38 -06:00
David Edmundson
3425c9c6d7 Handle context loss in QPlatformBackingStore
This powers a QQuickWidget and we also need to reset the context if we
get a context loss event.

Change-Id: Id8b7112606670985860069c2bb11cf141b3ac723
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-08 18:11:12 +01: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