Commit Graph

63071 Commits

Author SHA1 Message Date
Shawn Rutledge
801b8304fb Add QTextDocument* constructor argument to QTextMarkdownImporter
QTextMarkdownImporter::import() took a QTD* as if it would be ok to
reuse one instance of QTextMarkdownImporter for repeated importing into
different documents; but in practice, we never do that: in fact it's
usually a short-lived, stack-allocated object, as in
 QTextMarkdownImporter(&doc, QTMI::DialectGitHub).import(input);
So it's less clumsy internally to require the document be provided to
the constructor: that way a QTextCursor can be constructed immediately
too, as part of the importer object rather than separately on the heap.

This is private API, unused outside qtbase.

Change-Id: I8041ceb33cb7e7608df55dc5a963292c585afb90
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-09-01 08:17:29 +02:00
Morten Sørvig
09f7408d03 Set QSettings::Format enum associated values
Q_QDOC sees all values, and is going to document different
values than what Q_OS_WASM sees.

Set the values explicitly instead, and make each
value unique in order to avoid confusion.

Change-Id: I0a2ddf10652be78d5b80c486261199d0d7ed5c84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-01 03:34:37 +02:00
Thiago Macieira
e57ae31582 QSettings/Doc: make the two WASM enumerators in Format visible
Amends 7a0de7fda2.

qsettings.cpp:2385: (qdoc) warning: No such enum item 'WebLocalStorageFormat' in QSettings::Format
qsettings.cpp:2385: (qdoc) warning: No such enum item 'WebIndexedDBFormat' in QSettings::Format

Change-Id: I2b24e1d3cad44897906efffd17805aadd3bd11dc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-09-01 03:34:24 +02:00
Volker Hilsheimer
d027b0c816 Constrain QCoreApplication::requestPermission to compatible functors
The 6.5 versions of the overload not taking a context/receiver object
were constrained by requiring a functor to be free function or lambda.
207aae5560 removed that constraint, which
might be source incomaptible if wrapper functions in user code forward
the constraint using Expression SFINAE. Those wrappers would no longer
be removed from the overload set based on the same criteria as the
function they wrap.

We can't constrain the new functions based on the same predicate as
before, as after the simplification we have only one overload with, and
one without context object. But we can still remove overloads for
incompatible functors.

Add the respective scenario to the QPermission test as a compile-time
test.

Found during 6.6 header review.

Pick-to: 6.6
Change-Id: Id21391b4a6b78a29de2f8fa04374f4262e5fafa7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-01 03:30:50 +02:00
Ahmad Samir
875f988af5 QMdiArea: port Q_FOREACH to ranged-for, loop could call QCA::sendEvent()
Take a copy of the d->childWindows container because each loop body
may end up directly/indirectly calling QCoreApplication::sendEvent()
which means unbounded/unknown code could be invoked causing recursing
into the class, leading to modifying the childWindows container while
iterating over it.

Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: Ib62ba38700e8862940ba98fdeb663dd730ff125f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-09-01 01:30:35 +03:00
Ahmad Samir
54f989b30d qlocale_data_p.h: add missing #includeS
Otherwise static analyzers, e.g. clazy, complain about unknown types.

Remove qglobal_p.h include, not needed.

Regroup includes.

Change-Id: Ia8d2418911d6d3587eb5a77dde30052175e45da4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-01 01:30:35 +03:00
Ahmad Samir
7e7f296e97 QCBorDevice: add missing #include
For uchar. Otherwise static analyzers, e.g. clazy, complain about
unknown types.

Change-Id: Ie6a91f6e33eb9149b2d0188069edc2aa8f64a55b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-01 01:30:35 +03:00
Łukasz Matysiak
be46e8f335 undef READ and WRITE on VxWorks
On VxWorks READ is defined as 0 and WRITE as 1
this causes issues with moc and Q_PROPERTY
that are manifested as parse errors

Task-number: QTBUG-115777
Change-Id: I9ea971507fa30390affb8b6865bfde04e8fd5a7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-31 22:30:35 +00:00
Axel Spoerl
a7d7634f1b Implement QSignalBlocker::dismiss()
...to set m_o to nullptr and prevent an existing QSignalBlocker from
touching the QObject, which it was created for.
Add documentation and implement an autotest.

Change-Id: Ic18e80af5a57df1928f9d36aa0ab7ad79b6525fd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-31 22:11:51 +00:00
Axel Spoerl
38380de63c tst_qstatictext: Fix CMake condition
Private libraries were linked conditional to QT_FEATURE_private_tests in
the CMake file. qstatictext_p.h was included conditional to developer
build. A developer build fails, with test enabled and private tests
disabled.

=> Change the CMake condition to QT_FEATURE_developer_build, to resolve
mismatch between CMake and cpp file.

Pick-to: 6.6 6.5 6.2
Change-Id: I79213e7d3c38851b8b80cb8ab248d7bff750c227
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-08-31 22:11:51 +00:00
Axel Spoerl
41c8d215f2 tst_QSplitter: fix compiler warning
QLabel *l is declared uninitialized, assigned in a for loop. The last
object is deleted for testing purposes.
This leads to a false compiler warning about deleting a potentially
unintialized pointer.

=> initialize with nullptr to silence the warning.

Pick-to: 6.5 6.6
Change-Id: I1422b04fc1fdbfc7248de577884aabfb539f3f4b
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-01 00:11:51 +02:00
Axel Spoerl
70b57c943a tst_qsslkey: Fix CMake condition
Private libraries and WrapOpenSSL were linked conditional to
QT_FEATURE_private_tests in the CMake file.
qsslkey_p.h and open ssl symbols were included conditional to developer
build. A developer build fails, with test enabled and private tests
disabled.

=> Change the CMake condition to QT_FEATURE_developer_build, to resolve
mismatch between CMake and cpp file.

Pick-to: 6.6 6.5
Change-Id: I3ac93b02701e467a0b548c35d441d35a45c4568b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-09-01 00:11:51 +02:00
Axel Spoerl
4f4a8e75ab QItemSelectionModelPrivate: use QObjectPrivate::connect
QItemSelectionModelPrivate::initModel() uses string based connections,
to connect/disconnet its QAbstractItemModel.
The QObject::destroyed signal is connected to modelDestroyed(), which
does not disconnect other signals.

QQuickTableView's selection model binds to its QAbstractItemModel.
The binding also reacts to QObject::destroyed
Eventually, QItemSelectionModel::setModel(nullptr) is called.
At this point, only a QOBject is left from the QAbstractItemModel.
That leads to warnings about disconnecting string based signals, which
belong to QAbstractItemModel.

This patch changes the connect syntax to the QObjectPrivate::connect
API. Instead of keeping a list of string based connections around, the
connections themselves are kept in a list member. Disconnecting happens
based on that list.
Connections are also disconnected in
QAbstractItemModelPrivate::modelDestroyed.

An auto test is added in tst_QItemSelectionModel.

Fixes: QTBUG-116056
Pick-to: 6.6 6.5 6.2
Change-Id: I57e5c0f0a574f154eb312a282003774dd0613dd6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-09-01 00:11:51 +02:00
Assam Boudjelthia
381612f794 Image Gestures Example: use QFileInfo for images file names
The example keeps around image file names only and append
them to the selected dir path, that works fine for file
scheme files, but for Android with content scheme files,
that doesn't work as good because usually the paths are
returned by a provider and managing them manually like
appending a file name to a directory (tree) path might not
work.

This patch retrieves QFileInfo objects and use the absolute
file paths to open any image.

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-116181
Change-Id: I9911a181d92ba0452500398cbe052b9583bd79a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-08-31 22:11:51 +00:00
Axel Spoerl
b2f4e1e395 Remove dead code in QMessageBox
Remove code guarded by #ifdef 0

Task-number: QTBUG-115832
Pick-to: 6.6 6.5
Change-Id: I7d1dfd3dca2d8cda455d73f90dc2ae142ea41118
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-01 00:11:50 +02:00
Anton Kudryavtsev
8c5e5af11f qnetworkreplyhttpimpl: use const more
to avoid implicit detach

Change-Id: Ifac91e514b069d0426c70bd7e11cc04baca7994b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 21:38:49 +03:00
Anton Kudryavtsev
ec6267499e qnetworkreplyhttpimpl: port parseHttpOptionHeader to QBAV
Change-Id: Ib6ac31048b9e2063350e8b956791baeb3d5fbfae
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 21:38:45 +03:00
Anton Kudryavtsev
e28292b3d7 qnetworkreplyhttpimpl: use _ba literal more
to reduce allocations

Change-Id: I742a0ad34bfda8e7def0a7b075a331ab08d18c9a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 21:38:26 +03:00
Anton Kudryavtsev
51acd52cf7 qnetworkreplyhttpimpl: use range based for more
to improve readability. While touching code, remove needless copy of container

Change-Id: I04e44819621b5ea9a71f89352e8dd25d4c41de3d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 21:38:21 +03:00
Christian Ehrlicher
50f24f7152 SQL/SQLite: fix compilation with SQLite < 3.40.0
sqlite3_filename was indroduced with SQlite 3.40.0 so we have to define
it by our own for older versions.

Task-number: QTBUG-107120
Fixes: QTBUG-116572
Change-Id: I3186e58c3538135dc01a1be9cc54621699d1cec1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-08-31 16:54:45 +02:00
Anton Kudryavtsev
22cce68b2c qhttpnetworkrequest: use range based for more
to improve readability

Change-Id: Iaffb3ab8e4a188ee7cba3d9afc527cf3038a8040
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 11:48:09 +00:00
Anton Kudryavtsev
60133c364a qnetworkrequest: use _ba literal more
to avoid allocations

Change-Id: I747d212e5752bcb42977d6714d241918363d47db
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 14:48:05 +03:00
Anton Kudryavtsev
e84d9ea5e6 qnetworkrequest: extract method
De-duplicate code for cookie header making

Change-Id: I3ac59445089ee151a2f719454fa50cb9f37f72e4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 14:48:03 +03:00
André Klitzing
514a6776e1 Fix -no-feature-sharedmemory
Pick-to: 6.6
Fixes: QTBUG-114779
Change-Id: I7acf9bc2ba461fe1644c4ff6a157f88c9cce84c4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-31 13:23:25 +02:00
Casimir Saastamoinen
d4cccd0471 Enable binfmts incase it is disabled
Pick-to: 6.5 6.6
Task-number: COIN-1075
Change-Id: I476833e87af213b4fd7eced4accdc19f093c6824
Reviewed-by: Toni Saario <toni.saario@qt.io>
2023-08-31 06:31:36 +00:00
Thiago Macieira
946f15efb7 CMake/ELF: hide all Standard Library symbols
We've had issues in the past where Standard Library constructs either
with or without a Qt type mangled in the middle get exported from our
ABI and thus get marked with the Qt version numbers. For example, I can
see in our libraries:

  517: 000000000010e608     24 OBJECT  GLOBAL DEFAULT       22 typeinfo for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>@@Qt_6
  615: 00000000000eb2a0     47 OBJECT  GLOBAL DEFAULT       17 typeinfo name for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@@Qt_6
  706: 000000000010e5f8     16 OBJECT  GLOBAL DEFAULT       22 typeinfo for std::_Mutex_base<(__gnu_cxx::_Lock_policy)2>@@Qt_6
  750: 00000000000ed5f0     16 OBJECT  GLOBAL DEFAULT       17 std::_Sp_make_shared_tag::_S_ti()::__tag@@Qt_6
  754: 00000000000da408      1 OBJECT  GLOBAL DEFAULT       17 std::piecewise_construct@@Qt_6

This causes user content to break when an update to Qt stops exporting
such symbols, either because of code changes or because of changes to
the compiler and its optimizer.

In fact, this commit will cause that, for the symbols above. But this
will no longer be random-looking.

[ChangeLog][Important ABI Changes] On ELF-based platforms (e.g., Linux,
FreeBSD), the linking process has been updated to exclude Standard
Library symbols from getting the "Qt_6" ELF version. This solves the
problem of applications and libraries breaking arbitrarily after Qt
updates, but will cause such breakages right now. Content built with
older versions of Qt may need to be relinked.

Change-Id: I5acc02341c5940499682fffd1775edce0021ce6d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-08-30 23:26:26 -07:00
Thiago Macieira
167d28e77a QArrayData: change calculateBlockSize() to not have an in/out parameter
Won't make a difference in codegen, but it's the right thing to do.

Pick-to: 6.6
Change-Id: Ifa1111900d6945ea8e05fffd177dc8d200c2368f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-30 23:26:25 -07:00
Thiago Macieira
763592b238 tst_selftests: add a way to run a subset of all subprograms
This functionality was lost when we switched to Catch2.

Change-Id: I2b24e1d3cad44897906efffd177fb4cff641546f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-08-31 06:26:25 +00:00
Thiago Macieira
f1ba2b9f44 tst_selftests: deduplicate the Unix/Linux conditions
Amends 118f2210c6. That commit added

 #ifdef Q_OS_UNIX
     if (test == "assert"
         || test == "crashes"
         || test == "failfetchtype"
         || test == "faildatatype")
     return; // Outputs "Received signal 6 (SIGABRT)"
 #endif

Which duplicated 4 out of the 5 tests in the block:

 #ifdef Q_OS_LINUX
    // QEMU outputs to stderr about uncaught signals
    if (QTestPrivate::isRunningArmOnX86() &&
        (test == "assert"
         || test == "crashes"
         || test == "faildatatype"
         || test == "failfetchtype"
         || test == "silent"
        ))
        return;
 #endif

But as Linux is Unix, we never got to that second block for those 4
tests.

Pick-to: 6.6
Change-Id: I2b24e1d3cad44897906efffd177fb4b5507d190a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-08-30 23:26:25 -07:00
Thiago Macieira
fcb548878b CMake/Network: limit the testing for some network iface features
These features are now only used for qnetworkinterface_unix.cpp, so they
aren't needed for Windows or for Linux with AF_NETLINK support. This
commit removes the last couple of placess outside of that file where
they were used (the qnativesocketengine_unix.cpp code looked stale
anyway).

These tests cost us approximately 1300 ms during CMake time. This commit
does not change that because the tests are checked even if the condition
has already been forced OFF by previous conditions.

[ChangeLog][Build system] The QT_NO_GETIFADDRS and QT_NO_IPV6IFNAME
macros are deprecated. On a standard Linux build, they will be defined
to 1, even if the system does support getifaddrs() and ifnametoindex().

Task-number: QTBUG-107248
Task-number: QTBUG-115705
Change-Id: Ifbf974a4d10745b099b1fffd17775822a1a6e55f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-30 23:26:25 -07:00
Timur Pocheptsov
8051edfdb5 OpenSSL: move DH calls under OPENSSL_NO_DEPRECATED_3_0 guard
Initially, DH functions were deprecated, but when OpenSSL v3 was released,
they changed their mind (now they changed it again). OpenSSL must
be configured with 'no-deprecated'.

Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-83733
Change-Id: I69f14929e91f5fc147f9297f6fff20674e81b6f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-08-31 04:54:10 +02:00
Morten Sørvig
c802a9e987 wasm: rename JsString -> EcmaString
QString::fromJsString -> QString::fromEcmaString()
QString::toJsString() -> QString::toEcmaString()

For API naming compatibility with QByteArray::fromEcmaUin8Array()

Pick-to: 6.6
Change-Id: If6e2121e31e630d6728ed24e41d14b763f395aaa
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-08-30 23:02:03 +02:00
Michael Weghorn
9900a12df6 a11y uia: Don't return "S_OK" and null text range
When QWindowsUiaTextProvider::RangeFromPoint was
called with a point that is not over any
character, it was previously returning S_OK
and a nullptr for the text range.

This is contrary to what the
ITextProvider::RangeFromPoint documentation [1]
says:

> If this method succeeds, it returns S_OK.
> Otherwise, it returns an HRESULT error code.

and

> The property never returns NULL.

Therefore, setting pRetVal to NULL and returning
S_OK at the same time is problematic.
Return UIA_E_ELEMENTNOTAVAILABLE instead for that
case, and only return S_OK when actually
setting a valid text range provider as well.

Ideally, this should return an empty range for
the character that is closest to the given point.
That one could be identified by iterating over all
characters and calculating their distance to the
given point, but that would be too expensive.

[1] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextprovider-rangefrompoint

Fixes: QTBUG-115801
Pick-to: 6.6 6.5
Change-Id: Ib08d02677935a45517c937613785f1e3f53ee032
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-08-30 18:05:32 +00:00
Michael Weghorn
beb1a48ef7 a11y atspi: Map ButtonMenu role to AT-SPI equivalent
at-spi2-core commit [1]

    commit ed16f50e4930e32c29f80552eb698baa35b4677e
    Author: Fushan Wen <qydwhotmail@gmail.com>
    Date:   Thu Jul 21 21:49:32 2022 +0800

        Add `ATK_ROLE_PUSH_BUTTON_MENU`

        This role allows to specify a button will open a menu. It's widely used
        in Hamburger buttons, and Qt has QAccessible:ButtonMenu role for it.

added a new ATSPI_ROLE_PUSH_BUTTON_MENU role to AT-SPI,
so map to that from QAccessible::ButtonMenu when building
against a recent enough AT-SPI version.

Note that only a follow-up fix [2] for the above-mentioned
at-spi2-core commit increased ATSPI_ROLE_COUNT accordingly:

    commit b0a062fd02c0cef5cc73b67aae282216856b8d8a
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jul 13 14:15:33 2023 +0200

        Increase ATSPI_ROLE_COUNT after ed16f50e4

            commit ed16f50e4930e32c29f80552eb698baa35b4677e
            Date:   Thu Jul 21 21:49:32 2022 +0800

                Add `ATK_ROLE_PUSH_BUTTON_MENU`

        added a new role, so increase the role count
        accordingly.

[1] ed16f50e49
[2] b0a062fd02

Change-Id: If7082c7478c95c6cc68d1c735de47933599f8d2b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-08-30 20:05:20 +02:00
André Klitzing
5dc9692e48 Bump androidx dependency to 1.10.1
This avoids linter warning:
  Obsolete Gradle Dependency

Pick-to: 6.6 6.5
Change-Id: I9d2e3f7a4d082c7b90e5e533b9fe3d5046b79a48
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-08-30 19:35:42 +02:00
Ahmad Samir
3e6724b11a QAbstractItemView: port Q_FOREACH to ranged-for
Take a copy as the loop may end up calling QCoreApplication::postEvent()
which in turn could invoke unknown code that results in modifying the
QHash that is being iterated over.

Task-number: QTBUG-115803
Change-Id: I5f8aabb13ef7f60b470d0d3a986063775e787036
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-08-30 16:48:51 +03:00
Ahmad Samir
79dc2980e6 QMdiArea: port Q_FOREACH to ranged-for: loop doesn't change container
The container is childWindows in all cases:
- place(): queries the windows' geometries
- setChildActivationEnabled(): sets a bool member in subwindow->d
- subWindowList(): {pre,ap}pends windows pointers to a separate QList

Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: I0fdd5f22f29f085b71bf46f68bf9ec04c45c9317
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-08-30 16:48:47 +03:00
Ahmad Samir
446af298b0 QMdiArea: port Q_FOREACH to ranged-for, d->pendingPlacements
Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: Ibf2f049aacad925fea318c0ec490749e68e05b1d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-08-30 16:48:43 +03:00
Ahmad Samir
cfec14e1ff QMdiArea: port Q_FOREACH to ranged-for, d->pendingRearrangements
Take a copy of the member container as the loop may modify the container
(either by moving/reordering the Rearranger elements or by appending).

Pick-to: 6.6 6.5
Task-number: QTBUG-115803
Change-Id: Iaf891b29e9c7cdfdb3dc82e03ed94defb8d0cf4c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-08-30 16:48:39 +03:00
Tor Arne Vestbø
4ba7a76985 Allow QObjects to opt in to receiving ParentAboutToChange/ParentChange
QWidget already handles this, but it might be useful for non-Widget
object hierarchies as well, such as in Qt Quick.

The flag is opt in, and as QWidget already handles these events by
itself (without checking any flags), we assert that we don't end up
in this code path, instead of enabling it for QWidget. The latter
would mean refactoring the QWidget code, with possible regressions.

Docs and header comments have been updated to reflect that this
event is not widget specific. (This is an issue with other events
as well, that are documented to say "widget", since they came
from a time when there was only QWidget, but nowadays apply to
e.g. QWindow as well. That's something for another fix though).

Change-Id: Ib71962131d6011c17dcce8c01bd8adcdaa58d798
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-08-30 15:45:41 +02:00
Sharad Sahu
bb2f551b32 Create a menuItem element for accessibility when creating a MenuItem in a QML wasm application
Change-Id: Iba862211b72372e1f48639c8b1edfa6336869fa5
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-08-30 19:11:46 +05:30
Fabian Kosmale
ca4633f243 QAccessibleWidget: Remove pointless ZWSP in warning message
There doesn't seem to be reason for it to exist, and apparently it
causes compilation failures with icc.

Pick-to: 6.6 6.5 5.15
Fixes: QTBUG-116517
Initial-patch-by: Yorick Bosman
Change-Id: Ic2ed1d4318d522851278afa7f9791441af4fa709
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-08-30 14:40:45 +02:00
Anton Kudryavtsev
e1d00dce31 QTimer: avoid needless allocation
It was introduced in 4368179c37

Use QBAV to trim operation and then make QBA

Change-Id: I578305e5b5254c66052d8a11815aaa7209e629bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-30 12:40:44 +00:00
Olivier De Cannière
f9dccd05d3 QLocale: Add Q_ENUM registration for some enums
Fixes: QTBUG-116527
Pick-to: 6.5 6.6
Change-Id: If04bd5f504b3a8a39a35b9ba7024cdc9eb2d154a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-08-30 09:04:23 +02:00
Timur Pocheptsov
a323f05c5e tst_QSslSocket: don't use deprecated RSA api
OpenSSL 3.1.2 can be configured with no-deprecated option, in this
case test fails to build.

Pick-to: 6.6 6.5 6.2
Change-Id: Icaf457f55fb001b632922856dbe4bbb5bdba220e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-08-29 20:15:05 +02:00
Anton Kudryavtsev
a6886859ad hpack: use QBAV more
While touching code, use constexpr more

Change-Id: I1c5d80f257f742a2999147c12340bba38e8b1e2f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-08-29 18:15:05 +00:00
Thiago Macieira
2c86903704 Doc: update QTimer::start() to say that it sets the interval
I thought it went without saying...

Fixes: QTBUG-116218
Pick-to: 6.6
Change-Id: I964c2b1e6b834feb9710fffd177c8338f8f1e618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-08-29 07:41:26 -07:00
Thiago Macieira
a93f02e3ad CMake: remove test for eventfd, replace with __has_include
This also removes the configure option and therefore makes the feature
not disable-able. Saves 350 ms of CMake time.

Change-Id: Ifbf974a4d10745b099b1fffd17775528767595d4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-08-29 07:41:11 -07:00
Thiago Macieira
9c70e11711 QString: use qustrlen() in the QChar* constructor
Instead of a manual loop, which was there since at least Qt 4.5.1
(beginning of the public history).

Pick-to: 6.5 6.6
Change-Id: Ifa1111900d6945ea8e05fffd177dd3dfea450a67
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-08-29 07:39:03 -07:00
Thiago Macieira
bed203a6fc QVariant: de-duplicate customConstructShared()
Commit 3ad9f94ff2 (Feb 2023) moved it to
qvariant_p.h but commit 79ae79d05c
(authored Sep 2022 but committed June 2023) brought it back, probably by
accident due to conflict resolution during rebasing.

For some reason, no compiler in our CI complains about it, but ICX 2023
(based on unrelased Clang versions) did:

variant_p.h(101,23): error: call to 'customConstructShared' is ambiguous

Pick-to: 6.6
Fixes: QTBUG-116496
Change-Id: Ifa1111900d6945ea8e05fffd177eab656a2dc507
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-08-29 07:38:36 -07:00