65156 Commits

Author SHA1 Message Date
Ivan Solovev
1b5211a542 Improve documentation of Qt ordering types
Apply some documentation improvements that were suggested before FF.

Task-number: QTBUG-119433
Change-Id: I9b1d83c69821e25ae4cd8db0cbf3fa6d6330a6dc
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit aae6cf8d15837c9a29503d5fdeceb2a4b5befc55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 21:12:32 +00:00
Tor Arne Vestbø
267a34e490 cmake: Improve folder structure for Xcode and Visual Studio projects
CMake has a built in file extension list for "Source Files", that does
not include qml files. We can't extend that file list with a regex,
so we need to add qml files individually as a finalization action.

We also stuff generated files (both auto-gen as well as other generated
files) into a separate source folder, to focus the project on the user's
files.

Change-Id: Ic9a4d9daad088b1874bcf81e75c776537f3ff531
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 06ea3e3994b38e5fe9ac4f33044b0efa1f1be294)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 15:39:28 +00:00
Marc Mutz
e5d1c778ad QH2Expected: use Rule Of Zero
It doesn't always pay to be explicit about SMFs. In the present case,
clang-tidy complains that the move ctors of the class aren't
noexcept. It's a false positive, but just removing all the =default'ed
SMFs makes it go away, too.

Amends 0dba3f6b713a657eb3bf2037face72d16253eb92.

Change-Id: Ib641d4eed9e214b41c143b60494e82790da6fda8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit fab57c25e22239516dec737f2d42a7fccae9d37f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:49:32 +00:00
Ivan Solovev
ecfdb8b180 QEventLoopLocker: use macro to implement move-ctor
We do have special macros for this case, so use one of them!

Amends c2956f8f7685b624d7693ff644125d0f594c585d

Found in 6.7 API review.

Change-Id: I205966d6f7363abf1a26f59b04555b1a48a4e696
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 26b8e99b1ce616a063fcbd0d67f44ba9e7712f23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:59 +00:00
Ivan Solovev
f2b9258cdb qcompare.h: fix comment for std lib implementation selection
Amends 4b6f757020382ed157bf6beb572549f05e881359

Found in API review

Change-Id: I9154c6ad0236776054816bcdde03737290a633ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit edf92b8e33f896c764c8aac549385f6e46571a0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:59 +00:00
Mårten Nordheim
0002ba47e6 Http: Start more connections faster after determining network layer
Previously we would more or less wait for the first connection to finish before
initiating more connections. This was just happening by virtue of
calling startNextRequest when a request was finished.

Since we have already determined the preferred network layer, let's just
try to start more connections. In case we are using https this doesn't
make a difference because we will try http2 upgrade first before allowing
multiple connections. Unless, of course, http2 has been disabled.

Fixes: QTBUG-120619
Pick-to: 6.6 6.5
Change-Id: Id3c3be59fd07120bff574d63481119e5ed9eb88a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 88f5fc47ebf558fa72b7b447f8394a0d44b6bf9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:59 +00:00
Christian Ehrlicher
6224c3b0dc SQLite: Update SQLite to v3.45.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.45.0

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ibf37acf5bcee4639766d445991f5265dc78593c4
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 24a95c22fc9f09ca4415946e965615d022704ca3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:58 +00:00
Mårten Nordheim
47ae5f9178 D3D12: Fix warn-on-error for unused parameter
Amends 445fb40081c870c0a9b1c1c3cf27b20fdd36a531

Change-Id: Iee3eaffcb7fbbdb3cec8020ee7c9280d52faa0a2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 54824e7d2bf1066014f4e6f3bb3c2a9535435779)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:58 +00:00
Laszlo Agocs
273c96a941 Update QRhiWidget API based on review comments
Spell out some API names in enum.

Some functions are now protected.

Remove property for autoRenderTarget.

textureFormat -> colorBufferFormat.

Used "fixed" instead of "explicit" and follow
the above naming, so that explicitSize becomes
fixedColorBufferSize.

Change-Id: I2fd6ad46033313a3febbb8846146021d5dd11010
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit acebb97b58807d1d5910c79209664b21e741a9c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:58 +00:00
Marc Mutz
256ac39943 QMetaTypeModuleHelper: suppress cppcoreguidelines-virtual-class-destructor
Says clang-tidy:

   destructor of '(unnamed struct at qmetatype.cpp:966:14)' is public and non-virtual
   in file:src/corelib/kernel/qmetatype.cpp line:966 col:14

       static const struct : QMetaTypeModuleHelper

Yes, these classes are polymorphic (because the base class is). Yes,
the destructor is non-virtual (because the base class' one isn't, but
it's also protected, so fine).

But these classes are not used as base classes, so suppress the
warning.

Pick-to: 6.6 6.5 6.2
Change-Id: I75be86bca36a4a0e93d72acb1a0d2fe0dca1c505
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 11d153ae1ce3ce75e76a1fcac7bf99e4cff05716)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 14:32:58 +00:00
Tor Arne Vestbø
c7bfee363e macOS: Explicitly show extensions in save dialog if filter is "all files"
Otherwise clicking an existing file in the dialog will not populate the
full file name, which is what you'd expect for a filter allowing all
files.

Change-Id: Ib9a014352d5e567e54f95414e744566615d735d8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit c53955eaa085b14ef8e5348e951f8cd2cbfa4ea5)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-18 10:44:45 +00:00
Allan Sandfeld Jensen
c44caa1eaa Fix FP rasterization on Win-x86
We can not guarantee 128bit alignment on 32bit windows

Change-Id: I16bd3bded16bd29f4cb84b0cdf2671e4d9a19601
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0e8086887a2c931dc687b3c344ab5004749fa3eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 10:43:10 +00:00
Eskil Abrahamsen Blomfeldt
1b90af74dd Fix build with -no-directwrite
QWindowsFontDatabaseBase::invalidate() was defined inside an
the declaration was not.

Since the font file loader is only protected by
QT_CONFIG(directwrite), we move it out from the previous block
and add an #if for the contents instead.

Change-Id: Iedc02cceb15fe3d25d21b49af1486659a4d6373b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0d1ac449bbc38aee4341dd47189de901860d7870)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 10:16:40 +00:00
Thiago Macieira
96d03949d2 QNetworkRequest: export the static constexpr (inline) member variables
All that is required is that we write the declaration as if they weren't
inline, like we used to for C++98 non-constexpr static members. Amends
090991123dd82796fe956e4153bc26ace22280ca.

This is required with MinGW and happens with both GCC and Clang: when a
static constexpr variable found in an exported class is used in a
context that requires getting its address, the compiler emit a DLL-
importing statement. For example:

 void f(const std::chrono::milliseconds &ms);
 void f()
 {
    f(QNetworkRequest::DefaultTransferTimeout);
 }

Emits with GCC:
 _Z1fv:
        movq    __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
        jmp     _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE

And Clang:
 _Z1fv:                                  # @_Z1fv
 # %bb.0:
        movq    __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
        jmp     _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE # TAILCALL

Fixes: QTBUG-121135
Change-Id: I76ffba14ece04f24b43efffd17aae1a98071c570
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c09219e946ed3d90349c3638afe304553bf38011)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-18 00:33:55 +00:00
Eskil Abrahamsen Blomfeldt
97dc63861e Fix race condition when destroying Freetype font engines
If a QFont is moved to a different thread (B) than where it belongs (A),
and the font cache is then purged on thread A, the last remaining
reference to the engine will be on thread B. When this QFontEngine is
later replaced with one created on B, we end up deleting A's QFontEngine
on thread B.

This caused QFreetypeFace::release() to be called on the wrong thread and
the face would never be removed from the thread-local Freetype cache in
A. Hence that cache would contain a dangling pointer to the freetype face
which we would later end up fetching.

To avoid this, we make sure the thread-local cache itself increases
the ref count of the face. That way, the only time it will be deleted
on a different thread is when the cache has been destroyed because the
thread has shut down.

If the last reference (except the cache reference) to a face is cleared
on a different thread, we keep it in the cache until later. It will
then be in a "deferred delete" mode and will be deleted as soon as
possible. This is done either when the thread shuts down, when a lookup
causes the "deferred delete" face to be returned, or when release()
is called on any font on the thread (at which point we will purge all
faces that only have the single cache reference.)

Fixes: QTBUG-118867
Change-Id: Ifa07a9cb6f4cd3e783e12a73d8b283e70d6fb474
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 5761dd55c824afb7a7809c7a0d3ce3050b03fe7b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 18:07:58 +00:00
Alexey Edelev
4b662e9a92 Allow configuring the qtbase documentation-only build
Use the QT_SUPERBUILD procedure when configuring the qtbase
documentation-only build. This only makes sense for qtbase since we
disallow building it using existing Qt installation. Other repositories
should be configured using qt-configure-module script from the existing
Qt installation and simply run 'ninja docs'.

Fixes: QTBUG-120485
Pick-to: 6.6 6.5
Change-Id: Iafed5c17bea5c61edc239f08045922497215fb73
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 02a556674f0b3f04de5ab09dca53ed8e86a8ba06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:45 +00:00
Liang Qi
2bcfe080d9 tests: skip tst_QGuiApplication::topLevelAt() on Wayland
This amends 189f9873ae3f23377708fbf9880398fd6a078715 .

Pick-to: 6.6 6.5
Fixes: QTBUG-121015
Change-Id: I66d2a2b0162b9c7b488af840ff5d3a881b657782
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit d4f7d2aeabe2e778224d64a65667aa09b9e42a70)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:45 +00:00
Morten Sørvig
b2b1d02692 wasm: remove onLanguageChanged event handler
QSystemLocale is setting the global window.onLanguageChanged
property which may cause conflicts in cases where there
are more than one Qt app instance on the same web page.

In addition the QSystemLocale destructor never runs,
which breaks also for repeated QLocale instantiations
on the same page (for example for the QLocale auto-
test)

Change-Id: I85af0587527b2922804fc866c83864f677700e6d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3f74e2a633a809a27e8e66346e052dea48c4369e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:45 +00:00
Mårten Nordheim
c9a9469f55 Privately introduce QHttp2Connection
For use in QtGRPC.

There is some duplication between this code and the code in
QHttp2ProtocolHandler. But let's not change the implementation of
the protocol handler after the 6.7 beta release. Nor do I think we
should do it for 6.8 LTS. So let's just live with the duplication
until that has branched.

Fixes: QTBUG-105491
Change-Id: I69aa38a3c341347e702f9c07c27287aee38a16f2
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0dba3f6b713a657eb3bf2037face72d16253eb92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:44 +00:00
Tor Arne Vestbø
6972b8deea macOS: Reset save dialog extension when resetting file name filter
We map QFileDialog name filters to NSSavePanel.allowedFileTypes, for
example turning "Text Files (*.txt)" into allowedFileTypes = @[@"txt"].
In this case, the NSSavePanel will automatically add the extension to
the user's file name, if they just type "foo".

When a filter allows all files, we reset the allowedFileTypes to nil,
but this does not reset the automatically added extension, so if the
user switches from one filter (*.txt) to another (*.*), the file name
will still have a .txt extension.

This is problematic when the save panel's file name field does not
show the extension to the user, which can happen automatically if
the user types an initial file name without an extension, overriding
what we've asked by setting extensionHidden=NO. When that happens,
the user is shown "foo", but the actual file name is "foo.txt".

To mitigate this confusing situation we do a round-trip via the
UTTypeDirectory content type, which is a valid type without any
extension. This forces the save panel to remove any extensions
added automatically by previous filters.

Change-Id: Ia17a8c2734eff656116ef77a9813113a5076e9cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 40506954979fa7cdd34da8251f179557eb9be4f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:44 +00:00
Tor Arne Vestbø
5dabb905e7 macOS: Work around lack of native support for multi-part extensions
Multi-part extensions such as "tar.gz" are not natively supported by
macOS, e.g. one can not create a [UTType typeWithFilenameExtension:]
for such an extension, and this goes all the way down to Foundation.

As a result NSSavePanel gets confused when assigning a multi-part
extension to allowedFileTypes, because it's using NSString operations
such as stringByDeletingPathExtension or pathExtension, which also
lack support for multi-part extensions.

We've worked around this in the past by reducing these extensions to
their last component, e.g. "tar.gz" reduced to "gz", but this results
in the save panel turning the input file name "foo" into "foo.gz" if
the user doesn't provide the full file name.

Various attempts at working around the lack of multi-part extension
support by breaking allowedFileTypes into ["tar.gz", "gz"], or doing
selectively toggling of allowedFileTypes in panel:validateURL:error,
have all proved to have corner cases and shortcomings of their own.

As a last resort, we now treat multi-part extensions manually, by
disabling the allowedFileTypes filter, and doing our own validation
in the panel:validateURL:error callback.

This requires us to also manually handle automatic extension for
file names without extensions, as well as overwrite confirmation
in the cases we do add an extension manually.

The overwrite dialog and error messages for incompatible extensions
have been modeled after their native macOS 14 counterparts, using
translated strings from AppKit.

Task-number: QTBUG-109877
Change-Id: I6b7ce3c44b4c3b24802aa1f66f4593457ae4c929
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit d651cdb9885353af1ea0647733f0c002bf2d168b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:44 +00:00
Sami Shalayel
89ebbb1633 doc: add macro for QML Language Server product name
Add a macro for QML Language Server product name.

Task-number: QTBUG-120980
Change-Id: I8b7196881a1c3777f975079c22ecbeb6f868f5a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 4ec386eeeadfd9b6cd9e64d5907c3c20493a0b68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:44 +00:00
Tor Arne Vestbø
2561c7cd65 macOS: Disable currentChanged signal for NSSavePanels
The panelSelectionDidChange callback is only called when the user selects
a directory in the save panel, as all other files are not selectable.
And when that happens, the reported selection is not the directory,
but the current file name (which may be based on clicking an exsiting
file, but that doesn't cause selection changes).

To avoid this confusing and inconsistent behavior we disable the signal
entirely when showing an NSSavePanel.

Change-Id: If706b8faa7027ca284ec8398f5c6e2a110e01f91
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 942f5b23c2a279499e1e59ab283f5bafc54659e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:44 +00:00
Mike Chen
7b38b5e369 Make sure hicolor is searched before dash fallbacks
Search full icon name from hicolor before dash fallback

Pick-to: 6.6
Fixes: QTBUG-121030
Change-Id: I3e3ee142c33466203639f32857fce3ea1946a9f7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 0534a93ef04f38cf6dfc0d6c03827325d651a64c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 16:56:43 +00:00
Ghenady Kuznetsov
6affa9890d Fusion style: add clip region for groupbox title
Fusion style is missing clip region for the title in
QFusionStyle::drawComplexControl().
Without that region, the top line of the frame will be visible behind
the vertically centered title.

Fixes: QTBUG-121041
Pick-to: 6.6
Change-Id: I3daf5854195e28a5ee3cb50343e2dd56e66ed940
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 9b4c35abff94a708139923a32c38a749cbdfd130)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 11:30:27 +00:00
Alexey Edelev
5a44b8392d Allow disabling sanitizers for specific subdirectories
This introduces two new function that cleans up the sanitizer flags
and disable linking of the sanitizer libraries.

The qt_internal_skip_sanitizer function clears the sanitizer flags that
are set in CMAKE_<C|CXX>_FLAGS variables by ECMEnableSanitizers.cmake.

qt_internal_skip_linking_sanitizer collects all targets that are
created in subdirectory and disables linking the asan targets.

The asan target linking can be also disabled by setting
SKIP_SANITIZER on specific target.

Change-Id: Ibbbbec0b4a6bfd37d939b8a55f8d04656f73c536
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6a921b6751ff03a3093dfb279b02ec75e32f4adc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 09:59:14 +00:00
Juha Vuolle
8fd897d4bd Add static access function to wellknown headers
Resulted from API-review

Change-Id: I438a5cf9c88b572adece99af0314eefbc4371f8f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 37549cda7276343f96e314bf8edc60116e887718)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 06:54:46 +00:00
Juha Vuolle
be67204568 Rename QNetworkRequestFactory header functions to commonHeaders
Resulted from API-review

Change-Id: Iae712e67839d27064a0155830fd201ab15693091
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 819a8f30f4cf2efe3b8e1f3f6356ff0afed0ae65)
2024-01-17 05:48:32 +02:00
Juha Vuolle
aa2a569115 Remove HTTP headers equals() / comparison
There's several ways to compare HTTP headers, and arguably
the need for it is not very high. For the time being users can use
different accessors and compare in ways that make sense for
their use cases.

Consequently since HTTP headers are no longer trivially comparable,
it makes also comparing the request factories more 'moot' because
headers are a central piece of request information. So removed
comparison from request factory as well.

These comparisons can be restored later if a clear understanding
on it's need, and on how it should be best done, emerges.

Resulted from API-review

Change-Id: Idb5ab3710268b52a8e59656db8cc7de82f0ae511
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 89dab8578c10ed4aee4e2f4b51e7c962d618c1eb)
2024-01-17 05:48:30 +02:00
Christian Ehrlicher
b08c3af998 QImageReader test: add test image to qrc file
Add the test image to the qrc to make sure the image is available no
matter where the test is executed.

Pick-to: 6.6
Fixes: QTBUG-120732
Change-Id: I24de59fd88fdc2a3317c91ac28cf81fd5511455f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 076026fd60dfa399158498e42ee1b5000174c65e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-17 01:12:03 +00:00
Lorn Potter
c413bd9366 wasm: fix drag examples for webassembly
Change-Id: I47903743685fadfe33820e7785b72d62109e77d0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 39f81d14c1c0a09ff5165fa11b8369f8ae010ef4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 22:02:03 +00:00
Wladimir Leuschner
124e63965e QWindows11Style: Fix QMessageBox drawing for light/dark mode
Fixes: QTBUG-120748
Change-Id: I4101848e2e91c489cb53b38ae6bf0171701c5c54
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 27dea6cf23c22c8ee2f82d97486f248559e57993)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 21:17:49 +00:00
Doris Verria
b2eb82a42f QMetalRhi: Reset proxyData when swapChain is destroyed
When the swap chain is destroyed, we reset the swapchain’s layer
(set it to nullptr). However we were not resetting the proxyData which
would still point to the window’s (NSView) layer. This starts to become
a problem in  the cases where the swapchain’s associated QWindow is
closed (NSView gets destroyed) and reopened (a new NSView will be
created) because when the swap chain is recreated again, since the
proxyData already exists and points to the invalid old layer,
QRhi::updateSwapChainProxyData is never called. This led to an invalid
value being assigned to the swap chain’s layer.
To fix the issue, make sure to reset the swapchain’s proxy data when
destroy() is called.

Task-number: QTBUG-113498
Pick-to: 6.6 6.5
Change-Id: I02996ecf69ad9d183cac31c9188717ec36742531
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 948b93a847e1d6b78b5eee039281b3cd078fbabe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 21:17:49 +00:00
Tor Arne Vestbø
4a1ba399ea Remove note about QDockWidget::DockWidgetClosable not working on macOS
It does nowadays.

Pick-to: 6.6 6.5
Change-Id: Ie14a84460abfebd42c93e5ae41969d9e3b4c4f5d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit a99d31307600d6ca52890022605c7f1b10ccb7bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 21:17:48 +00:00
Jaishree Vyas
e2ad97eef9 Doc: Create separate Graphics and Multimedia example categories
Fixes: QTBUG-117884
Pick-to: 6.6
Change-Id: I33c7b1cbfaeae866dffb0e89a5d09d775736d886
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 98ee4d9e37a1038d46f0c0494332c0ed46dbb323)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 18:10:59 +00:00
Joerg Bornemann
06e9da856c CMake: Fix user_facing_tool_links.txt for Apple platforms
User-facing apps that are app bundles on macOS weren't linked correctly.
For example, for Qt Designer we're creating now an entry like the
following:
    .../Designer.app/Contents/MacOS/Designer /usr/bin/designer6

Pick-to: 6.6
Fixes: QTBUG-120487
Change-Id: I3eada15c4c5bf31b9b08829333d3c87f76ede7a2
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 2921a70e5d8de5bf3f4b56b90347983aa9b1342b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 18:10:59 +00:00
Tinja Paavoseppä
e47180b46d Android: Handle embedding container windows better
Initialize surface container type to TextureView to
make sure it's set also for embedding containers.
Additional checks for embedding containers when
setting parent or changing visibility.

Change-Id: Iba07bfbb9e8f16804627efbdfe78559ac2580e41
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 46b86410a9730b099fa350516c3902db0ee01291)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 18:10:59 +00:00
Tinja Paavoseppä
ccd624eacc Android: Add possibility to provide app main lib name without metadata
Normally, the app's main library's name is read from a metadata field
in the AndroidManifest.xml file, which is filled out by
androiddeployqt.
Add a protected variable in QtLoader for the app main library name
that can be set to provide the library name without the metadata field.
This is useful in cases where we don't have a manifest file filled
by androiddeployqt, for example when embedding QML to an existing
Android app.
As a side effect, change the name of existing variable for the main
library and the method to access it to make it more explicit they refer
to the library's absolute path.

Change-Id: I869547818f4d0272668a1052d7bc6916b7bf5a98
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 8e9918e476430cc30007f2acf69f0c0fe120a03d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 18:10:58 +00:00
Inho Lee
c4dfea83b6 IBus: Support a property ClientCommitPreedit
IBus added the ClientCommitPreedit property to handle
preedit in case.
If this writable property is set,
ibus_engine tells the client whether current preeditText
should be committed or not in the client side when
focusOutEvent.
(Qt's old behavior is always committing in the client side.)

Fixes: QTBUG-109576
Fixes: QTBUG-58005
Pick-to: 6.6 6.5
Change-Id: I6bb78921ce04cdd3197cba9e2fb00376d5e0ac8b
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 84cf0e2be54d9ad183db063fd429b792c67edd18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 18:10:58 +00:00
Tinja Paavoseppä
023dd3adb1 Android: Add possibility to listen for changes in app states
This is useful for example the embedded QML case, where we want to
make sure everything from Qt side is ready before we start to create
Qt windows.

Change-Id: I8148405e35cc8ebb89110f05e07cef06f8ff3709
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6102ee6dd8f3e6cee3e3bc7544329c5c4b7843f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 18:10:58 +00:00
Axel Spoerl
b01235ca3f Revert "QDockWidget: Always show dock widgets with the main window"
This reverts commit 4c60a11d8f935abb762a83b0ab99cefa6db3060c.

Reason for revert: Breaks QMainWindow::restoreState(). Dock widget is shown, even if restored into hidden state.

Change-Id: I9808de4e0fd48871c3b234ae9bbaf6c64c8e832d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0ea37300d111beea3bb353f036d6c747f63c88dd)
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-01-16 14:55:24 +00:00
Kai Köhne
fef7baaf11 Remove foreach snippets from the documentation
We don't recommend foreach anymore, and have in fact
adapted two snippets already to use for(), but missed
the documentation text.

In any case, it feels a bit weird to give an example
how to iterate over QStringList in each of these methods,
so we might as well just remove this part.

Pick-to: 6.6
Change-Id: If8744e48961661ad518f5f24781c38f371d981bc
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 3b9f6b54b1cda08079ae97956478a4af55133803)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:24 +00:00
Volker Hilsheimer
1f3f99f673 Don't include windows.h in the public qopengl.h header
All we need are the APIENTRY and WINGDIAPI macros, as those are used
in the gl.h header. Define those locally for the time we need them.

Use a QT_APIENTRY macro instead of hijacking APIENTRY for when we
declare OpenGL functions with the stdcall calling convention.

A few build fixes needed in tests that used Windows types without
explicitly including windows.h first, or that (incorrectly) included
one of the sub-headers of windows.h (like winuser.h).

[ChangeLog][Potentially Source-Incompatible Changes][OpenGL]
On Windows, the public qopengl.h header no longer includes windows.h.

Fixes: QTBUG-120687
Change-Id: I3770ac8eaeee5bcf4e7234e5a2539935a8aa5a7d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit b13c610f50c714873987d8c4f30f50953ade9aba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:24 +00:00
Tor Arne Vestbø
87aa94008b cmake: Explicitly generate Xcode schemes for executables and libs
Otherwise, Xcode will auto-generate schemes for all targets, including
internal targets such as foo_autogen and build-only targets such as
ZERO_CHECK and ALL_BUILD, choosing one of them at random when opening
the project for the first time.

If multiple targets get a scheme they will be sorted alphabetically.
We could prioritize them by generating a xcschememanagement.plist
file, but that would require teaching CMake about that feature.

This aligns the CMake behavior with qmake, where we also generate
schemes explicitly.

Pick-to: 6.6 6.5
Change-Id: I3756fced37a4ff7792370da10fc49169cc271ae8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 822dc75f1a0be988b25741a8f16ddc2fbeb48e77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:24 +00:00
Timothée Keller
15cf52cd59 Windeployqt: also allow platform-type plugin selection
Including/excluding plugins of the platforms type did not work, since
windeployqt was only ever looking for 'qwindows'. Keep the default
behavior of deploying 'qwindows.dll', but also allow users to
add/remove platform-type plugins.

Pick-to: 6.6
Change-Id: I4062a71939224d1462896d95a2541e8caced399d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit bca41b1832bf1ce76787109456094149520bc403)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:24 +00:00
Mårten Nordheim
72c2d67250 Http2: move assemble_hpack_block declaration to header
Change-Id: I5033d433d2aa499007a6e436dbb70d9c48315e8b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 8ce261f6d857e8b05c8043042fce101cb95cd868)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:24 +00:00
Tor Arne Vestbø
b9640c0ecf cmake: Mark auto-generated rcc files as generated
Allows us to hide them in a separate folder in Xcode and Visual
Studio projects.

Change-Id: I5ce7884ce50198c3b0c9654bb188f38a8a679be0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6e215a44c131598c5f75198a443d796f2709ad89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:24 +00:00
Timothée Keller
073340a6d8 Windows QPA: don't take dpi rounding policy into account when fullscreen
With some HighDpiScaleFactorRoundingPolicy, going fullscreen can end up
not filling the whole screen. In this case, ignore the rounding (only for
the window size, not its content).

Fixes: QTBUG-115954
Pick-to: 6.6
Change-Id: Ie87196358ef28dbe2fcbc180b1740ed9f784b4a0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit da473f3a80798d84d0f1bd9175158024a548ec68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:23 +00:00
Kai Köhne
2a18c00c2a Doc: Improve documentation around setting ALLOW_INTERACTIVE_AUTHORIZATION in D-Bus
Change-Id: I4830b375c5f8c7986985c1d6caddc51348fb45ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4c86f9b8049ad7717988125c725492febc44010b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:23 +00:00
Joerg Bornemann
95770f1bd3 Remove temporary exclusion from unity build
Commit db9fa4a61791794823e570f8aa7f6e5eed8c5f52 excluded
qelapsedtimer_mac.cpp from the unity build. The necessary patches have
been merged, and we can remove this exclusion from 6.6 on.

Pick-to: 6.6
Change-Id: I85b353b202af1fd8eeea43753e5dc5ce18357d19
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 75f5eec2c904b5a3a274d9f1c70e14e687e6fa29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-16 14:55:23 +00:00