Commit Graph

61747 Commits

Author SHA1 Message Date
Ahmad Samir
43ec3d8d01 Break some include cycles in qglobal.h [1/3]
Remove qglobal.h include from qcompilerdetection.h, qsystemdetection.h
and modulecppexports.h.in

Testing locally, the code builds on Linux with precompiled headers
disabled/enabled (qt_pch.h includes qglobal.h, so building with PCH
enabled isn't useful for testing this) and with/without bootstrap.

qrunnable.*: missing includes detected by compiling with
-DFEATURE_headersclean=ON.

Task-number: QTBUG-106722
Change-Id: I70864dfbf117ffd7fe492eb715a413eb6f209990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-26 19:48:29 +03:00
Volker Hilsheimer
2d9f7633bf Doc: use [since] tag for enum values added in Qt 6.6
Remove the manual "This enum value has been introduced..." text. Doing
that only for 6.6 to avoid unnecessary cherry-pick conflicts and general
code churn.

Change-Id: I89a6fd313582fd0c5d6209608a3740f19f91bd01
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-05-26 18:48:24 +02:00
Amir Masoud Abdol
966e256116 Make CONFIGS arguments of qt_internal_remove_compiler_flags optional
There was a discrepancy between what the comment was saying, and what
the function was doing before, and with this patch, we opt for what the
comment was saying, which makes more sense. In addition, I cleaned up
its documentation a bit.

Pick-to: 6.5
Change-Id: I07c20f93aa5c8e9bc942f5e69f0cf8299f4a813e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-26 18:48:23 +02:00
Alexey Edelev
fec618b723 Ignore carriage return character symbol explicitly
If users prefer non-unix new line style when building Qt in Linux
'\r' leads to an issue. syncqt cannot parse Qt header files using
inputstream. Add the explicit ignorance of the carriage return
character to make sure that it won't break parsing of the Qt headers.

Pick-to: 6.5
Fixes: QTBUG-113771
Change-Id: Iac69e77788517fe160118297051597a656b2f345
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-26 18:48:23 +02:00
Eike Ziller
47db21965d Examples: Do not add the same category twice
Amends 1371cd107a

Task-number: QTCREATORBUG-29197
Change-Id: I0dd4a08a597c237fd09f788cafb79af755953d0d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-05-26 17:44:54 +02:00
Alexey Edelev
18ef6849d2 Add the list of previously searched packages to qt_find_package
When configuring Qt the second time it might be situation that
the set of qt_find_package calls is changed. One of the scenarios
is the changing of the submodule list that needs to be built in
top-level builds. It's also applicable for Qt features that lead to
extra package lookup in the unlocked subdirectories. Current approach
collects packages that were found at the previous run and skips
search of the packages that are missing. The problem is that
it also skips packages even if qt_find_package was not called at
previous run. QT_INTERNAL_PREVIOUSLY_SEARCHED_PACKAGES collects
all packages that were actually searched at the previous run
to make sure that qt_find_package don't skip packages that
appeared at second run only.

Note: Described scenarios may still have other issues and are not
tested well.

Fixes: QTBUG-113244
Pick-to: 6.5
Change-Id: Iab36060a28fbaa16a3b3bdba67795955c496b0c3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-05-26 17:44:54 +02:00
Joerg Bornemann
f18842dc38 Remove the -no-gcc-sysroot configure option
This option is dysfunctional since Qt 6.0. Modify the CMake variables
CMAKE_SYSROOT_LINK and CMAKE_SYSROOT_COMPILE instead.

Change-Id: Ib97dcc765c4644b5c3975d4b61c0e567451ea977
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-26 17:44:53 +02:00
Joerg Bornemann
fcf5eb7fee Remove the -silent option from configure-cmake-mapping.md
There's just no good equivalent with the CMake based build.

Change-Id: I923ef3173d631afe2db0bdacc1d02c1f4649b741
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-26 17:44:52 +02:00
Joerg Bornemann
360ccedd2c CMake: Remove the -mp configure option
This configure option is dysfunctional since Qt 6.0. If you really want
to add the /MP compiler option, add it to CMAKE_CXX_FLAGS.

Change-Id: I00b535067944df52abbadb424ec03e53aa41c819
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-26 17:44:51 +02:00
Joerg Bornemann
9639d11687 CMake: Remove the -make-tool configure option
This configure option is dysfunctional since Qt 6.0.
Use -cmake-generator instead.

Change-Id: Idb147ec8087018dab3ac0e571eeff7d1f18e34f6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-26 17:44:51 +02:00
Joerg Bornemann
a02be0f1cc Remove -list-libraries from configure-cmake-mapping.md
This Qt5 configure argument does not exist anymore.

Change-Id: I68c798eb2769c93e3ca0b30d6a3da3247e319eee
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-26 17:44:50 +02:00
Joerg Bornemann
06f117d7ca CMake: Update USE_FOLDERS comment in qt_standard_project_setup
Mention that CMake 3.26 introduced CMP0143 which enables USE_FOLDERS by
default.

Change-Id: I35deed9838f99f377657ca19a4e6058e1ecbedcf
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-05-26 17:44:49 +02:00
Ievgenii Meshcheriakov
1538d30c76 qdbusxml2cpp: Use modern string literals
Replace QStringLiteral and QString::fromLatin1 by u""_s or ""_L1.

Also use initializer list constructor for QStringList.

Change-Id: Ife020ddf48d27dd015aed1c04878216165decf69
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-26 15:46:37 +02:00
Ievgenii Meshcheriakov
f6be12f2f9 qdbusxml2cpp: Combine string literals
Use multi-line string literals instead of repeated applications
of << operator. This should improve code size and performance.

Change-Id: I661454c007877bf86a289174e98d4cd3fe145d6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-26 15:46:36 +02:00
Ievgenii Meshcheriakov
464bcc0b6a qdbusxml2cpp: Use "\n" instead of Qt::endl
This program is non-interactive and its output does not need
to be flushed after each line of the generated code. Using "\n"
improves code size, performance and readability.

Change-Id: I7def2a207cf4e5c3960db6ba3d8a8574eb0d27c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-26 15:46:35 +02:00
Ievgenii Meshcheriakov
4f65f91d6f QDBus: Fix typo in a function name
Rename connectionCapabilies -> connectionCapabilities

Change-Id: I07deff1b944b30404548181d5c930b76fb1a575c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-26 15:46:34 +02:00
Marc Mutz
c7af8d5808 Deprecate qAsConst()
std::as_const() is a 100% equivalent replacement.

[ChangeLog][Deprecation Notices][QtCore] qAsConst() is now
deprecated. You can simply globally search and replace "qAsConst" with
"std::as_const" in your code-base.

Change-Id: If9b29f9b4119cf5bdb9f0a1ada1271c6bb503916
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-26 15:46:34 +02:00
Thiago Macieira
432d67b43f QDnsLookup: add TimeoutError for timeouts
We were getting InvalidReplyError because it was simply unknown, which
is not very useful. Previously, the Unix code used res_nquery(), which
does not return timeouts as a condition. It returns -1 if a timeout did
happen, but the content in errno could be a left-over from a previous
timeout (see the "Not a typewriter"[1] problem).

With the rewrite to using res_nmkquery() and res_nsend() from the
previous commits, we can rely on errno being set properly by
res_nsend().

$ $objdir/tests/manual/qdnslookup/qdnslookup @0.0.0.1
; <<>> QDnsLookup 6.6.0 <<>> qdnslookup @0.0.0.1
;; status: TimeoutError (Request timed out)
;; QUESTION:
;qt-project.org                 IN A

;; Query time: 10008 ms
;; SERVER: 0.0.0.1#53

Tested on FreeBSD, Linux, macOS, and Windows.

[1] https://en.wikipedia.org/wiki/Not_a_typewriter

Change-Id: I3e3bfef633af4130a03afffd175e31958247f9b1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-26 06:46:33 -07:00
Thiago Macieira
5ecdce0c35 QDnsLookup/Unix large replies: manually handle VC [3/3]
The current code was inefficient when replies exceeded the initial
buffer size because the res_nsend() function switched to VC to get the
full reply, but that wouldn't fit our buffer before we enlarged it. This
commit tells res_nsend() to only use UDP or only use TCP, avoiding the
two unnecessary transactions in the lookup.

Since we don't get that second TCP reply now that would tell us the size
of the reply, we must allocate the largest possible buffer for a DNS
reply.

Change-Id: I3e3bfef633af4130a03afffd175e73d2e9fa9bf1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-26 06:46:32 -07:00
Thiago Macieira
df07d98243 QDnsLookup/Unix large replies: use EDNS0 [2/3]
The current code is inefficient when dealing with replies exceeding the
PACKETSZ default size. This commit adds an EDNS0 footer to the DNS query
informing the DNS server how big our buffer is. We choose a larger
buffer than the old PACKETSZ so more will fit before a Virtual Circuit
(TCP socket) is required.

The choice is based on IPv6 requirements for the minimum MTU. Any
network incapable of transmitting frames with that big a payload must
support fragmenting and reassembly at the Layer 2 level, below IP.
Ethernet MTU is usually 1500, so we leave a bit on the table, but this
avoids having to discover our Path MTU to the DNS server.

This is incomplete: DNS queries above the 1232-byte limit still perform
the same query four times.

Change-Id: I3e3bfef633af4130a03afffd175e72f7fbc9265d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-26 06:46:31 -07:00
Thiago Macieira
b673fa09c3 QDnsLookup/Unix large replies: use res_nmkquery & res_nsend [1/3]
The current code is inefficient when dealing with replies exceeding the
PACKETSZ default size and especially those that require the use of a
Virtual Circuit (TCP socket). When the TC (Truncated) bit is set in the
DNS reply header, res_nquery() automatically switches to VC so it is
able to return the full size of the reply to us. This means we make the
same request four times:
 1) over UDP, getting ~512 bytes of data
 2) over TCP, getting the full reply but returning ~512 to us
 3) over UDP again, getting (maybe) 1400 bytes of data
 4) over TCP again, getting all the data

This commit splits res_nquery() into its two component functions,
res_nmkquery() and res_nsend(). This is incomplete: the four queries
above still happen.

Change-Id: I3e3bfef633af4130a03afffd175e728d96d6a604
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-26 06:46:31 -07:00
Samuli Piippo
4a46ba1209 network: fix link issue with older libc
Amend 68b625901f and fix link issue with
slightly less modern libc/libresolv where not all functions have been
moved over to libc.

ld: src/network/CMakeFiles/Network.dir/kernel/qdnslookup_unix.cpp.o: in function `QDnsLookupRunnable::query(QDnsLookupReply*)':
qdnslookup_unix.cpp:(.text+0x183): undefined reference to `__res_nquery'
ld: qdnslookup_unix.cpp:(.text+0x437): undefined reference to `__dn_expand'
ld: qdnslookup_unix.cpp:(.text+0x621): undefined reference to `__dn_expand'
ld: qdnslookup_unix.cpp:(.text+0x8ff): undefined reference to `__res_nquery'
ld: qdnslookup_unix.cpp:(.text+0xbd7): undefined reference to `__dn_expand'
ld: qdnslookup_unix.cpp:(.text+0xd7f): undefined reference to `__dn_expand'
ld: qdnslookup_unix.cpp:(.text+0xf4f): undefined reference to `__dn_expand'
ld: qdnslookup_unix.cpp:(.text+0x10fa): undefined reference to `__dn_expand'
ld: qdnslookup_unix.cpp:(.text+0x131c): undefined reference to `__dn_expand'
collect2: error: ld returned 1 exit status

Change-Id: If81b292222c78d828b9fef61f30a62f1d584c183
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-26 06:46:30 -07:00
Giuseppe D'Angelo
2794742fac QLogging: fix indentation
Just a whitespace change.

Change-Id: Ib54cb2f8c49c0cece3ff9b85f290c0c21eb85487
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-26 11:10:06 +02:00
Oliver Wolff
cbf29a8720 Guard qwindowscombase.h with qt_windows.h include
qwindowscombase.h pulls in windows.h so not guarding its content by
including qt_windows.h might cause hard to track down issues like
min/max macros being defined.

Pick-to: 6.5 6.2 5.15
Change-Id: I3c48660ed87122bb0c4f6830c8d0b288ec62a509
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
2023-05-26 06:17:24 +02:00
Dennis Oberst
1d487e5593 CompareAgainstLiteralZero: fix SFINAE considerations
This issue arose during the comparison of two different ordering types.
When comparing QPartialOrdering::Less to QStrongOrdering::Less, an
unintended overload was considered due to the SFINAE ctor-overload of
CompareAgainstLiteralZero. For example:

static_assert(QPartialOrdering::Less == QStrongOrdering::Less);

would consider:

friend constexpr bool operator==(QtPrivate::CompareAgainstLiteralZero,
                                 QStrongOrdering rhs) noexcept

as an overload. To address this, a stricter approach is now used
by triggering the SFINAE-check on std::nullptr_t instead.
This resolves the ambiguity while still rejecting std::nullptr_t
as intended. As the compiler is unable to resolve this automatically,
this refactoring is required.

Pick-to: 6.5 6.2
Change-Id: I9ab7e55d2822980198f38f5a66143387999a4d94
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-05-25 22:04:57 +02:00
Thiago Macieira
5f531ae2ac QDeadlineTimer: make the ForeverConstant an enum class
Avoids the implicit cast to int, which then fixes the overloading
problem of QDeadlineTimer with older functions taking an integer with
the number of milliseconds. Without this and the workarounds, an
expression like
  waitCondition.wait(&mutex, QDeadlineTimer::Forever);
would be the same as
  waitCondition.wait(&mutex, 0);
which is the opposite of "forever".

This means we can remove the overloads added earlier this week in
commits 37f1fb78ee (QMutex),
63704529b7 (QReadWriteLock), and
37f1fb78ee (QSemaphore). I hadn't thought
this solution until noting that QWaitCondition needed the same solution
and then remembering how Qt::Uninitialized was fixed of the same
problem.

Change-Id: I5f7f427ded124479baa6fffd176023ddfb91077d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-25 08:43:52 -07:00
Thiago Macieira
b5c9eec15c Enable QT7_ONLY for bootstrapped mode too
Change-Id: Ib5ce7a497e034ebabb2cfffd1761e2ab9a335103
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-25 08:40:38 -07:00
Edward Welbourne
f2ab85429d Document the RSS Listing example
Add an image and a QDoc file, remove the (in some cases misleading)
doc comments from the CPP sources, group the slots all together in the
source so as to document them together, group the two private methods
together. Dust the header lightly with comments to classify the class
members and enclose relevant parts in QDoc snippet markers.

Task-number: QTBUG-111228
Pick-to: 6.5
Change-Id: I0090fb45ce8d5a8f168fde9b3247d541b709c1b2
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-05-25 17:40:38 +02:00
Edward Welbourne
2e09d03cd1 rsslisting example: use initializer list to construct string list
It's cleaner than declaring, using << to populate, then using once.
Just construct it and use it where it's needed.

Task-number: QTBUG-111228
Pick-to: 6.5
Change-Id: Id10483b26937a97899d656c4b26f27b37b8d39b6
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-05-25 17:40:37 +02:00
Edward Welbourne
3c78f1e96e rsslisting example: rename a slot to reflect what it does
Many slots can be connected to one signal so, unlike a virtual method
that must be named for the situation in which it is called, a slot can
(so should) be named for what it does, rather than naming it to match
the signal it's connected to.

Task-number: QTBUG-111228
Pick-to: 6.5
Change-Id: If2fa40cac0e51a243054526d7d2997fdd54aea3e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-05-25 17:40:36 +02:00
Edward Welbourne
fe2af0f8a3 RSSListing: remove metaDataChanged slot to handle redirects
QNetworkAccessManager takes care of doing that by default anyway,
these days.

Task-number: QTBUG-111228
Pick-to: 6.5
Change-Id: I890d258599e22efb6fc6ce0140304a97edcbb3f8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2023-05-25 17:40:35 +02:00
Edward Welbourne
e7b1bc6590 Turn itemActivated() slot of RSS listing example into a lambda
It needs nothing but the parameter it is passed and has no material
interaction with the rest of the RSSListing class, so there's no point
devoting a slot to it, much less a public one.

Task-number: QTBUG-111228
Pick-to: 6.5
Change-Id: I46d572982197550801c6fa4425453fc670c6f2f1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-25 17:40:35 +02:00
Volker Hilsheimer
bdbfa7757a QWindow test: Blacklist enterLeaveOnWindowShowHide
This test fails too frequently on Android and RHEL to leave in as
significant. The bug report is already closed after timeouts were
extended, so perhaps we just have to accept the status quo. No
point in keeping tickets open for tests that we can't get stable on
some platforms.

Pick-to: 6.5
Task-number: QTBUG-102239
Change-Id: I54b8ae821e93b3e1f24acd67a2e84ef405388667
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-05-25 12:07:35 +00:00
Volker Hilsheimer
6a2b029138 QLabel: always show the context menu created by the control
Amends e718818745, after which a context
menu was only shown if the format was rich text and there was a link at
the position of the click.

We always want to leave it up to the control to create a context menu,
so only return early if there is no control. The control will then
respect content at the position (i.e. link or not) and text interaction
flags, and create the menu based on that. I.e. a rich text label with
selectable text should still show "Select All" in the context menu, also
if not clicking on a link.

Add a test case to verify that the context menu event got accepted
as expected, which indicates that the label showed a menu.

Pick-to: 6.5
Change-Id: Ib2b36286e4f1253d10489b5add83e8cdd7197a06
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-05-25 14:06:57 +02:00
Volker Hilsheimer
16cf095bd5 Silence warning from unused variable in QObject test
It's not needed, but makes the point for having a mutable lambda in the
first place.

Change-Id: I483862d6aee90bb62d4b5363c56a80bb05e14df7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-25 14:06:55 +02:00
Volker Hilsheimer
833da1f31c QPauseAnimation test: add QNX to platforms that might fail
The noTimerUpdates test has been quite flaky since the optimization
of single shot timers in 87535e4e43.

Since we run QNX tests in QEMU, it's hard to guarantee anything that
involves timers, so tagging that platform as one of those that have a
bad timer resolution.

Change-Id: I6567ea0dee859a207d4b9f659a02e805a2f87d63
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-05-25 14:06:50 +02:00
Volker Hilsheimer
17bad8be11 Doc: fix warnings for QSetIterator see-alsos
Amends 0306247f5a, which removed some APIs
from QSetIterator as they couldn't be implemented without operator--.
That resulted in qdoc warnings, which this patch removes by splitting
the QSetIterator documentation into a separate block that quotes the
previously shared documentation text, but uses a reduced set of see-also
links.

Change-Id: I2aac59b927a36216a718aa8e5d092ea4d9f6c15b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-05-25 12:06:49 +00:00
Tor Arne Vestbø
a1b1a30f8a permissions: Remove need to check QT_CONFIG(permissions) in user code
The idea was to avoid having to define return values for platforms
that did not have a permission backend (yet), but the approach does
not work for QML, and was a bit awkward in C++ as well.

We now return Qt::PermissionStatus::Granted on all platforms without
a permission backend, which allows the user code to have a single
code path for checking and requesting permissions. Importantly, that
code path will not be any different now that we always grant the
permission then what it was when the user ifdefed out the permission
check via QT_CONFIG(permissions).

Task-number: QTBUG-90498
Change-Id: I564a24ccfd6b335cb90b7a621778fba61d53a56c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-25 13:46:30 +02:00
Tor Arne Vestbø
cbc239b52b permissions: Work around template partial specialization GCC bug
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71954

Pick-to: 6.5
Change-Id: I029f881fc44494a94c3e0233af3f3587b63ce7c4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-25 13:46:29 +02:00
Ievgenii Meshcheriakov
c968405455 QDBusAbstractAdaptor: Send signals using correct interface
When forwarding a signal, associate this signal with its
enclosing metaobject instead of its sender's metaobject.
Those two may be different if the signal is declared in
a base class.

Add a regression test into tst_qdbusconnection.

Fixes: QTBUG-33142
Pick-to: 6.5
Change-Id: I532ab3bb6c0671a480568f46d63fceff0c82c097
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-25 11:30:40 +02:00
Amir Masoud Abdol
69b69a7bcc Add [[maybe_unused]] to avoid compilation warnings on Android
When cross compiling for Android, these need to be marked with
[[maybe_unused]] as they might break the build due to Android not having
pthread cancellation feature.

Pick-to: 6.5
Change-Id: I3b3fb58b5e6df8ce37c2d8d9b1b8e8295f0aebb0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-25 08:18:45 +02:00
Antti Määttä
11491fcc5f CTF: Fix reading a session file
Use qsizetype. Invert fread arguments to get the read size.

Pick-to: 6.5
Change-Id: I20684dc7a30177394b387e8893198007dbf36eed
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
2023-05-25 09:01:09 +03:00
Volker Hilsheimer
8fa28b0cff Update Cached Table example meta-data
Drop "Example" from the example's title, add SQL instead, and add it
to the Input/Output category of examples. It's a documented example,
does something meaningful, and looks reasonable. Having one SQL example
categorised so that it's easy to see that Qt includes that functionality
seems like a good idea. The other examples are mostly small API
examples that are still good to have as fully-functional apps rather
than just snippets.

Pick-to: 6.5
Change-Id: Ib960f38db39c791f7ff5a2b9bf3157ee32b362ec
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-05-24 17:29:20 +02:00
Samuli Piippo
84e6d89c1b treeview: fix build without accessibility
Amend 6a4afebc5c and add ifdefs around
use of Accessibility.

Pick-to: 6.5
Change-Id: Ib40132dabeec9c3cff2f71dd5182eb1715b9c76a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-24 18:29:14 +03:00
Christian Ehrlicher
048a68c1e9 SQL: Make QSqlDatabase::DriverDict creation thread-safe
Make the QSqlDatabase::DriverDict thread-safe and make sure it's
properly cleaned up on destruction.

Pick-to: 6.5 6.2 5.15
Fixes: QTBUG-112961
Change-Id: I1ff70e477579231754ef829fdede944d6042894d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-24 17:27:55 +02:00
Yuhang Zhao
68f35a571a QAbstractScrollArea: don't call QScrollBar::sizeHint unless we need to
We only take the scrollbar's extent into account if the respective
policy is Qt::ScrollBarAlwaysOn, so don't compute it otherwise.

Done-with: Ilya Fedin <fedin-ilja2010@ya.ru>
Pick-to: 6.5
Change-Id: Idaf9404860d1f778d7a89b19d9f7fc16201ce29e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-24 11:25:29 +00:00
Yuhang Zhao
f7511171ac WASM: fix build error
CMake gives me an error if the double quotation marks are missing.

Pick-to: 6.5
Change-Id: I83a6037dde7503bf2e6fa9316aed732d5ef08576
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-05-24 11:23:18 +00:00
Yuhang Zhao
8cae710c6c WASM: fix wrong parameter passed to CMake function
The function needs TRUE/FALSE, not NO_EXCEPTIONS.

Change-Id: I3e173e26fafc02996577466afd09e85351a0380f
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-05-24 11:22:47 +00:00
Thorbjørn Lund Martsum
178da993a0 QDialog - avoid potential crash
In case the dialog is deleted while signals are emitted, we should
likely prevent a crash. Now, obviously it would be remarkable
if people deleted the dialog meanwhile, but it can also happen if the
attribute WA_DeleteOnClose is set and QAppliction::processEvents() is
called in a slot connected to accepted or rejected.

Pick-to: 6.5
Change-Id: Iafa708dec2c1064ea890f222ff5a8d15c94cbe4c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-24 11:08:35 +00:00
Mårten Nordheim
c891d16490 Skip diffie-hellman parameter test when not supported
Pick-to: 6.5
Change-Id: I0c21aeea813ee48f8c62689dafce6f7fb9620001
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-05-24 13:08:34 +02:00