Commit Graph

63211 Commits

Author SHA1 Message Date
Christian Ehrlicher
fd96e11bb1 QTextFormat: documentation fix
The QTextFormat description refers to setDirection() but this function
does not exist. The correct function name is setLayoutDirection() even
in Qt4.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I2d1f49fba558874b5875d8d93ef61d6208134609
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-08-28 21:18:16 +00:00
Ievgenii Meshcheriakov
d865e3ef1d QDBusServer: Remove private slot
Use QMetaObject::invokeMethod() to schedule call to
QDBusConnectionPrivate::_q_newConnectioni() instead.
This also gets rid of a by name signal/slot connection.

Change-Id: I8725c4e3815c5580c5561bdddda0ab722b06346e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-28 22:03:03 +02:00
Ievgenii Meshcheriakov
f87d214000 QDBusPendingCall: Remove private slot
Use connection to a lambda instead. This makes
QDBusPendingCallWatcherPrivate obsolete and it is also removed.

Change-Id: I3d80ff2da25609c694322e5fef4231600ba346b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-28 22:03:02 +02:00
Laszlo Agocs
80520c2f52 Enable QWidget::grab() with QRhiWidget in the widget tree
This involves reimplementing QWidgetPrivate::grabFramebuffer().
Widgets call this function whenever a texture-based widget is
encountered.

This implies however that we rename QRhiWidget's own, lightweight
grab function, grab(), because it kind of shadows QWidget's grab().
Switch back to grabFramebuffer() which is what QQuickWidget and
QOpenGLWidget both use.

Supporting QWidget::grab() is particularly important when grabbing
an ancestor of the QRhiWidget, because that has no alternative.
Right now, due to not reimplementing the QWidgetPrivate function,
the place of the QRhiWidget is left empty.

In addition, grabFramebuffer() is now const. This is consistent
with QQuickWidget, but not with QOpenGLWidget and QOpenGLWindow.

Change-Id: I646bd920dab7ba50415dd7ee6b63a209f5673e8f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-08-28 21:14:28 +02:00
Andreas Eliasson
41f032e358 Doc: Remove links to removed examples
These examples have been removed as part of the examples revamp project.

Pick-to: 6.6 6.5
Change-Id: I2a8237334a2acae2735c2dbd86004048d288896a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-28 18:55:12 +00:00
Anton Kudryavtsev
6cc1a84005 qnetworkrequest: reduce branches in loop
Unconditionally append separator and then chop last one

Change-Id: I33d004df07ce0c3c0076dc374ae7a2f8c413aeba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-28 19:11:15 +03:00
Mikolaj Boc
5c5c9dd830 Main thread-proxy localStorage oprations in native WASM QSettings
localStorage is unavailable on workers. Operations will now get proxied
to the main thread instead.
This - among other benefits - makes tst_QSettings::testThreadSafety
pass.

Task-number: QTBUG-115509
Change-Id: Iebbe5e9f9069948f8728e0a82628cc082b30de12
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-08-28 17:53:29 +02:00
Elias Hautala
39a5ed4bdd Exclude some examples from Android build
Excludes  dnslookup, waitconditions, semaphores, cbordump, savegame,
convert, pingpong and complexpingpong examples from Android build
because of missing Qui and Quick dependenies.

Task-number: QTBUG-111933
Pick-to: 6.5 6.6
Change-Id: Ied01f62ee61a9220dcb44c13fda46f6a5e158293
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-08-28 16:00:45 +03:00
Piotr Wierciński
c95555e9f7 CI: Enable tests under auto/wasm on Wasm platform
Change-Id: Ib017f59b06cc5a7df73ad9f9a0c036670d6458b0
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-28 14:10:02 +02:00
Laszlo Agocs
735a864360 QRhiWidget: Use QRhiRenderTarget as the return type for renderTarget
There is no point in using the more specialized derived class
(QRhiTextureRenderTarget), even though that is what the rt always is.

None of the example and test code needs changes since relying on
QRhiTextureRenderTarget specifics is very rare in practice (now it will
need a static_cast), whereas in the majority of cases the return value
is passed on to other functions, for example, beginPass(), that take
a QRhiRenderTarget.

Change-Id: Ifaebb6320a156ec6a9013e72fede04e520aa9aaf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-08-28 14:10:02 +02:00
Ivan Solovev
39b39f0d5f Update gradle to 8.3.0
The latest version of gradle was released on August 17, 2023

This update ignores most of the changes to gradle.properties file,
as we do not really use most of the variables which are set by the
upstream release.

Task-number: QTBUG-116236
Pick-to: 6.6
Change-Id: If66e1a264328b772e742473b859ed9240f77b9c6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-08-28 14:10:02 +02:00
Laszlo Agocs
fa89173486 rhi: vulkan: Handle the Display P3 enum value
For parity with Metal. VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT is
mapped to kCGColorSpaceExtendedLinearDisplayP3 by MoltenVK.

Change-Id: Idba4ed56c029c1dea166e278ec6fc3f41e5ac471
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-08-28 14:10:02 +02:00
Laszlo Agocs
38b13e562b Reduce swapchain dependencies in QBackingStoreDefaultCompositor
Instead of passing around the QRhiSwapChain, pass the objects queried
from it. There is no point in tying the helper code to a swapchain
when all that can function with other (texture-based) render targets as
well.

Change-Id: I0b14853f537c2d641eb67815c10edfe72e958fdf
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-08-28 14:10:02 +02:00
Ahmad Samir
be0e81d493 Gui: fix CMake warning about unconditionally installed headers
qaccessible.h and qplatformaccessibility.h are supposed to always be
installed as public headers, regardless of QT_FEATURE_accessibility.
Their contents are wrapped in "#if QT_CONFIG(accessibility)", so
installing them even if QT_FEATURE_accessibility is not enabled
shouldn't be an issue.

The warning was about uncoditionally installed header files,
"CONDITION_INDEPENDENT_SOURCES", being in a
"qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility"
call. Thanks to Alexandru for confirming my vague suspicions about the
issue in the bug report.

This amends commit 9f36ab1f8d.

Task-number: QTBUG-111785
Pick-to: 6.6
Change-Id: I5e5950f341d6729e15961d6fb3d3f8fe85007e38
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-08-28 15:10:01 +03:00
Safiyyah Moosa
3b187f14a1 Doc: Add \examplecategory to qtgui
Task-number: QTBUG-116068
Pick-to: 6.5 6.6
Change-Id: Ia0bdc2122434adac51b37ba2207a2b0b993cf19b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-08-28 13:49:36 +02:00
Anton Kudryavtsev
3730212312 qnetworkrequest: port parseMatchImpl to QBAV
to save allocations, and use tokenize to avoid temp container

Change-Id: I2a43612b9d15538a93d4afd2c544714507141f0f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-28 14:49:36 +03:00
Anton Kudryavtsev
8db5896bbe qnetworkrequest: port parseHeaderName to QBAV
Change-Id: I39af8649468636d09db46aac770f5df7a3582b50
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-28 12:47:16 +03:00
Christian Ehrlicher
49e52e8dd6 SQLite: Update SQLite to v3.43.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.43.0

Pick-to: 5.15 6.2 6.5 6.6
Fixes: QTBUG-116248
Change-Id: I039f572d21a8506faa5e29a48cdc7e40f990d946
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-08-28 05:23:05 +00:00
Anton Kudryavtsev
e3bb75340e qnetworkrequest: extract method
for If-Match and If-None-Match parsing

Change-Id: I523f5c639a01bafe6f25f13c0d25b3c62fa75282
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-27 15:09:13 +03:00
Anton Kudryavtsev
881260f9e4 qnetworkrequest: use new parseCookies overload
While touching code, replace split with tokenize

Change-Id: I3382ab6937892b0d6ba37591fbe3697a958c69bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-27 06:30:34 +00:00
Anton Kudryavtsev
d253156687 QAuthenticator: replace split with tokenize
to avoid needless allocations

Change-Id: I39eb90ef073db5359e7a559e33233b1e75b7461c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-27 09:29:45 +03:00
Anton Kudryavtsev
3273c03b51 QHostAddress::toString: use QSB more
Change-Id: Id7d9675c5a8dd09d0edaaa34a28a07fead068109
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-27 06:28:49 +00:00
Anton Kudryavtsev
98e7da8e32 QNetworkCookie: add QBAV overload for parseCookies
Rewrite impl to reduce allocations by QL1S::tokenize

Change-Id: I8d131ef6d7fe9a1a9daa438efea026392deb5e55
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-27 01:01:10 +03:00
Anton Kudryavtsev
5442ebe5e8 QNetworkHeadersPrivate::findRawHeader: use algorithms more
No raw loops

Change-Id: Ieeaff911f4c6f2c88d358fd1bc1250ffe75f5c6f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-26 21:47:15 +03:00
Anton Kudryavtsev
449f975566 QHttpNetworkHeader::headerField: port to QBAV
In QHttpNetworkRequest and QHttpNetworkReply this method is used with const char* literals, so no need to create QByteArray

Change-Id: Ifef7cb23aa434577455625077ef1adaab085c8ae
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-26 18:45:00 +00:00
Anton Kudryavtsev
a10c8647b3 qhttpnetworkreques: use range based for more
to improve readability

Change-Id: I4d4342f45296e2d6f439c6a74292c6c922e95194
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-26 18:35:40 +00:00
Ievgenii Meshcheriakov
a6027d4c59 QtDBus: Use invokeMethod accepting member functions with arguments
This makes the code slightly more readable.

Rename one overload of QDBusConnectionManager::doConnectToBus to
avoid using qOverload.

Change-Id: Id878e5baade539c3f748b5bf66a5aff726604b89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-26 17:24:19 +02:00
Ievgenii Meshcheriakov
712149802b QDBusconnectionPrivate: Replace permanent connections with invokeMethod
Change-Id: Ife8d4495a98e34c8364293f3423b52f65ac187c4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-26 17:24:13 +02:00
Fabian Kosmale
7f9d213765 moc: Drop support for function declaration without type specifier
Neither C++ nor modern C allow omitting the type (which used to be
equivalent to an "int" return type).
moc should not try to parse functions in C code, as they cannot be
meta-methods. So there is no point in supporting it.

Change-Id: I2b3a492988f29e8139311db64be110581cc1a4de
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-26 12:13:08 +02:00
Lorn Potter
91d3c48d3d wasm: remove 'shift' from being inputed on touchscreens
Fixes: QTBUG-116231
Pick-to: 6.6 6.5
Change-Id: Icbbe80877c2c21c3e82ba2c27909b6679b72e498
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-08-26 12:57:55 +10:00
Thiago Macieira
a0550df6d9 tst_QFile: extend virtualFile() to test in unbuffered mode too
Change-Id: Ifbf974a4d10745b099b1fffd1777acb752350375
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-25 15:54:15 -07:00
Thiago Macieira
7ca82250e0 tst_QFile: update virtualFile() to check if readLine() reads all
We know that all lines from /proc/<PID>/maps end in a newline, so we
trim exactly that one byte, then we put it all back together with
.join('\n') to check if we've read the entire file.

Linux virtual files are usually served in 4 kB increments; tst_qfile's
maps file is about 16000 bytes for me, just short of the QIODevice buffer:

[pid 414315] read(5, "55c6afe04000-55c6afe11000 r--p 0"..., 16384) = 4049
[pid 414315] read(5, "7f215fd25000-7f215fd26000 r--p 0"..., 12335) = 4038
[pid 414315] read(5, "7f2160800000-7f21608c7000 r--p 0"..., 8297) = 4072
[pid 414315] read(5, "7f216119f000-7f21611a0000 rw-p 0"..., 4225) = 3994

It is not a coincidence that the reads are at line boundaries, though
it's not a guarantee from the kernel.

We appear to have accidentally fixed the QEMU emulation bug by reading
another process' /proc/<PID>/maps (hypothesis: QMU emulates the target
system in /proc/self, hiding itself in maps, but makes no translation
for other process map files.

Change-Id: Ifbf974a4d10745b099b1fffd1777ac919b12dc90
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-25 22:54:08 +00:00
Thiago Macieira
9d4579c1cd CMake: modernize ipv6ifname and getifaddrs config checks with QT_CONFIG
I've left the QT_NO_ macros because they were public. No one should be
using them (and they are now 1 on Linux, so you had better not be using
them), but just in case.

Change-Id: Ifbf974a4d10745b099b1fffd177758a7a26e4244
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-08-25 15:53:03 -07:00
Anton Kudryavtsev
5a291761e0 QNAM: use _ba literals more
to reduce allocations

Change-Id: I4e03d7d51380e14b4c2aa50c5836d09f2aaf608d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-25 22:29:51 +03:00
Anton Kudryavtsev
efb5424800 QAuthenticator: postpone creation of QBA
Create QBA only when it's needed
While touching code, use std::move more

Change-Id: I5f014822a47d41fa1fca46a85a7921c70d1d9a55
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-25 22:29:51 +03:00
Anton Kudryavtsev
12184ebe7f QAuthenticator: use QSB more
avoid temp allocations

Change-Id: I8ca4d4b748f79d1c7a4455a5105998c58c91c7a4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-25 22:29:51 +03:00
Mikolaj Boc
141f0ca338 Move runTaskOnMainThread to qstdweb_p.h, use it in WASM dispatcher
This unifies the approach to running sync tasks (possibly with a
return value) on the main thread.

Change-Id: I2a05c4f40115a79dbf03c03fa8d8db34124884dc
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-08-25 20:21:28 +02:00
Piotr Wierciński
62caae9578 wasm: Fix QFileDialog file filter
File filter was not properly processed when using LocalFileAPI.
The QtFormat->AcceptList conversion was happening twice, resulting
in erronous types. This prevented dialog from appearing on Chrome.
Additionally remove unused debug code.

Fixes: QTBUG-115087
Pick-to: 6.5 6.6
Change-Id: Ie6770e2f1d2aa7c3ad19f9ab105dbec8102d45fc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-08-25 18:21:28 +00:00
Anton Kudryavtsev
5d534d8913 QNetworkCookiePrivate::parseSetCookieHeaderLine: port to QBAV
Change-Id: If777e43d5c24820dfab02bbf49501b09d82cc2a0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-25 20:04:47 +03:00
Anton Kudryavtsev
6db83b57de qnetworkrequest: use QBAV more
to reduce allocations

Change-Id: Ifcb7da9d302efafd7f890b6b3fb52b7a740274d1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-25 17:04:47 +00:00
Alexey Edelev
d02c3151b2 Disable android_deployment_settings test for non-standalone scenario
The test changes couple variables to emulate the user project
environment. These variables also affect the policy handling.
The test will build and work properly only if tests are built
standalone. So add this limitation.

Amends 2e340cea88

Pick-to: 6.6
Change-Id: I0cc49bf55bf7763e4c3ecdfa5333fb0453f06794
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-08-25 18:37:23 +02:00
Timur Pocheptsov
a3cbbe449a Blacklist tst_QMainWindow::QTBUG52175_tabifiedDockWidgetActivated
We are BLACKLISTing on macos/arm - the test is flaky.

Pick-to: 6.6 6.5
Task-number: QTBUG-115945
Change-Id: I3be28c895d46ce5ba86e00d597016334bdb16021
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-08-25 18:37:23 +02:00
Assam Boudjelthia
0f41819196 Android: use all nameFilters at once for native file dialog
Since the native file dialog doesn't allow changing the name filters
after it's been opened, another way to ensure that we comply with
the provided nameFilters list is to provide them all at once.

[ChangeLog][Android][FileDialog] use all nameFilters at once since
Android file picker can't change nameFilters after being opened.

Pick-to: 6.6
Change-Id: I389feecae190af41b87c7f2070494bd57eec4b69
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-08-25 16:37:23 +00:00
Ahmad Samir
788d19439b tst_QAccessibility: compile with QT_NO_FOREACH
QObject::children() returns a const QList&, and nothing in the loop body
changes the objects children, so straightforward port to ranged-for.

Task-number: QTBUG-115839
Change-Id: I78827fd986d6ff2607cc2616ff23580c9d830f1b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-08-25 18:56:28 +03:00
Joerg Bornemann
bfca8c6d24 Doc: Document TR_EXCLUDE
Pick-to: 6.5 6.6
Change-Id: Ib2e06e46f44564a2c7581ff4d7f3d8a29d2756c9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-08-25 17:56:28 +02:00
Anton Kudryavtsev
639a7a6f6c QNetworkHeadersPrivate::findRawHeader: port to QBAV
Change-Id: I15274eaa79d05a2aed909bada94276f98ae25fe8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-25 15:56:27 +00:00
Pasi Petäjäjärvi
dd3840a1a2 QGuiApplication: Report default platform name before initialization
Calling this function before we had a QGuiApplication instance, would
return an empty string, even if QT_QPA_DEFAULT_PLATFORM_NAME was defined
at compile time. We now return the default platform name

[ChangeLog][QtGui][QGuiApplication] QGuiApplication::platformName
now reports the default platform name if QGuiApplication hasn't been
instantiated yet. It used to return an empty string.

Pick-to: 6.6 6.5
Change-Id: Iffe7cde8943ed2d186bc494d0920b9cf79389dd0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-25 15:56:27 +00:00
Anton Kudryavtsev
002c2723c9 qnetworkcookie: reduce allocations
by using QBAV::toInt instead of creating temp QBA + atoi

Change-Id: I90dd78e3fd989930071e3bd99c914087409aa948
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-25 14:33:51 +03:00
Tor Arne Vestbø
ea25b3962b Stabilize tst_QGraphicsEffect::draw()
It's very flakey in CI: http://testresults.qt.io/grafana/goto/XZQAAPRSg

What we want to test is whether Qt issues paint events in response
to enabling an already enabled effect. Doing so via qWait will process
both window system events and posted Qt events, and the former might
include spontaneous paint events from the system that we can't control.

Task-number: QTBUG-115945
Pick-to: 6.5 6.6
Change-Id: I65e5c6a4458e77b3bd2ad700c5caf6d441f4ca53
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-08-25 09:04:37 +02:00
Ahmad Samir
2e37cff19e tst_QSpinBox: handle an old TODO
QTBUG-69492 has been fixed since Qt 5.12.

Pick-to: 6.6 6.5
Change-Id: I8bc59bd37a9ee2f47f13fa8ff54aa91e2c9148fa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-24 23:35:01 +03:00