The setup:
- build Qt with '-static -qt-zlib'
- configure a user project with plain cmake and -DQt6_DIR pointing to
the Qt6 package
In this case, the implicit find_dependency(BundledZlib) call will
fail with:
CMake Error at lib/cmake/Qt6/QtFindWrapHelper.cmake:120 (message):
Can't find Qt6::BundledZLIB.
Call Stack (most recent call first):
lib/cmake/Qt6/FindWrapZLIB.cmake:6 (qt_find_package_system_or_bundled)
cmake/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake:76
(find_package)
lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:36 (find_dependency)
lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:39
(_qt_internal_find_third_party_dependencies)
lib/cmake/Qt6Core/Qt6CoreConfig.cmake:42 (include)
lib/cmake/Qt6/Qt6Config.cmake:233 (find_package)
CMakeLists.txt:7 (find_package)
For example it would fail for the rasterwindow example configured with:
cmake ~/qtbase/examples/gui/rasterwindow \
-DQt6_DIR=$HOME/builds/dev-mac-static/qtbase/lib/cmake/Qt6
The failure happens because we don't pass any additional paths to the
find_package call that looks for BundledZlib, as opposed to how we do
it for module packages.
The project configuration does not fail if it is configured with any
of the following variables:
- Qt6_ROOT or
- CMAKE_PREFIX_PATH or
- the Qt generated toolchain file.
That's because these implicitly add relevant paths where to look for
Qt packages.
This came up in qtdeclarative RunCMake CI tests, where we only pass
Qt6_DIR to the test projects. It didn't come up in qtbase, because
none of the current qtbase RunCMake tests try to find Qt6Core.
To fix this particular case, conditionally pass the same paths that
Qt6Config.cmake uses when looking for module packages, to the
find_package call that looks for the bundled target.
We do it conditionally for bundled targets only, because for system
libraries we want to default looking for the module
FindWrapSystemFoo.cmake files.
Add a RunCMake test which will try to find a few Qt modules solely
based on having only Qt6_DIR set.
Pick-to: 6.8 6.9
Change-Id: I4d4e548f4c10370c4964ab8968b5772e26855dd4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
VoiceOver reads the readonly textarea as
"Multiline text field, read-only, double tap to edit”
Fixes: QTBUG-136665
Change-Id: I809a842795a18bcd0756d39b0f6240981b762ef9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
If a QDockWidget has a window icon, copy it to the respective tab of
the group windows.
[ChangeLog][Widgets][QDockWidget] When grouping dock widgets in tabs,
the dock widgets' window icons are now used in the tab bar.
Fixes: QTBUG-136624
Fixes: QTBUG-814
Change-Id: I59c393e864a7bd3e52e376778257aff0dc8aea4b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Due to synchronous position handling, it is not necessary to wait for
event based geometry updates.
Always return true on Android.
Change-Id: Iad1da66e38b2ec1193c5569b4d1764c7202ea319
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Custom titlebar input handling is done on WM_NCHITTEST, which is handled
at the WinAPI level. The WinAPI does not take into account the swapped
mouse buttons when querying the state of VK_LEFTBUTTON and
VK_RIGHTBUTTON with GetAsyncKeyState, so this behavior has to be
implemented manually. In case of swapped mouse buttons,
GetSystemMetrics(SM_SWAPBUTTON) will return true. This patch inverses
the meaning of Right and Left buttons in case
GetSystemMetrics(SM_SWAPBUTTON) returns true.
Pick-to: 6.9
Change-Id: Ie46e130dc0bb49de318c8d04a3cc426f7a346b5b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Zhao Yuhang <2546789017@qq.com>
It was not clear that the function will return true even when the
result is not yet ready, so mention it explicitly.
Amends 44ceb56455c82df3e6b1c9a2fa373cac14a039f8.
Fixes: QTBUG-136530
Pick-to: 6.9 6.8 6.5
Change-Id: I03b79f2b28c4bb755e6f56147cc7af1413ed4e57
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Setting focus and contentEditable on m_window causes
innerHTML to build up with characters.
This does not happen when using the m_canvas
The downside is that m_canvas is aria-hidden, but this
should, in principle, not be a problem since
m_canvas should not be focused when a11y is in
effect.
Later aria-hidden might be set only if a11y is in
effect.
This is a candidate for manual cherry-picking to
6.9 6.9.1
Task-number: QTBUG-136687
Change-Id: I08a9db2c39f9b0b0038c75fd06d3504b736ea031
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The code was missing an escaped dollar sign.
Pick-to: 6.8 6.9
Task-number: QTBUG-122899
Change-Id: I51bff0a128546085e9418682b540d92eacfdbbe4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
QSslCertificate::fromPath() does some extra work:
- matching wildcard glob or regular expression patterns
- checks if the string it's called on is a file or a dir
That extra work isn't needed when you already have the path to a
specific certificate file.
E.g. qtlsbackend_openssl.cpp:systemCaCertificates() used to call
fromPath() on *.pem/*.crt files that it got from iterating over system
certifcates dirs.
This also de-duplicates the code in fromPath().
[ChangeLog][QtNetwork][QSslCertificate] Added fromFile() method.
Change-Id: I92ab358e4711866dd4510da42c47905c7dae58b1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
`path` may contain wildcard glob patterns or regular expression ones,
so this method tries to get a path prefix without those special
characters, but that prefix could end up being empty, to counter
that, "." is used as a prefix. This led to iterating over the
current dir, which isn't the intended behavior. If the current dir
has many files, this could end up slowing things down (which is what
happens in the bug report).
Fix the issue by returning early if `path` is empty.
Amends 49f143e19ca11ef48260a3aaaa4ddbe490cf81ab.
[ChangeLog][QtNetwork][QSslCertificate][Important Behavior Changes]
fromPath() no longer accepts an empty path, which would previously
result in searching the current directory.
Fixes: QTBUG-134419
Pick-to: 6.9 6.8 6.5
Change-Id: I29224c3a47794b4095db5feae32a964dd9b854ff
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Internally QDirListing uses the name filters to create
QRegularExpression objects which are then used to do the matching. Here
we are looking for files that have ".pem" or ".crt" extensions, so basic
string matching should work the same and is inherently faster.
Pick-to: 6.9
Change-Id: Ib19b1eb8717b21c3b96a52e7036665c40fb24caf
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
... instead of reyling on the QByteArray to QString implicit conversion.
Pick-to: 6.9
Change-Id: Ia9e8026f2962009d9deac044e42b18f6333cfec1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Regexp was renamed to RegularExpression.
Amends 813111689629a71e51d7d149a5f689b2961f2716.
This looks like a "dead" code path, QT_FEATURE_regularexpression is
most likely always enabled.
Pick-to: 6.9 6.8 6.5 5.15
Change-Id: I99af481bb41a197a0b7d00c750440a93d8e6a3fe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
When the app process is restarted (e.g. after revoking a permission), Qt
isn't running yet, so we must not restore the saved bundle state.
Fixes: QTBUG-136497
Fixes: QTBUG-136077
Fixes: QTBUG-135961
Pick-to: 6.9.1 6.9 6.8
Change-Id: I5ec594ec93dd3ba13b088d63ec77a3649e21d798
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
There is a problem with generating functions signature by Emscripten for
functions defined with EM_JS. This break dynamic linking when these
functions are imported from SIDE_MODULES.
This commit works around that issue by porting these functions to C++
which fixes their signature generation.
Task-number: QTBUG-136741
Change-Id: I3356d4dbe89b99e099d9d22327370471dc03c935
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
While technically true, those don't assert while qBound does,
so it gives you a false sense of security that
qBound(min, val, max) is safe for unsanitized input ranges.
Pick-to: 6.9 6.8 6.5
Change-Id: Ie26f5eba586a3cd2d3e0cd769427f518e1bc92b9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
In some situations where the model is set sufficient late
an auto resize would never be applied. See bug report for
further details.
This is solved by moving to the normal memory model when
the global resize mode is changed to resizeToContents or stretch.
Fixes: QTBUG-136453
Pick-to: 6.9
Change-Id: Ie0448042a7d23b059eaf7464a662f0f551d89fd9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The result of inputMethodAccepted() function might switch after
setFocusObject()/showInputPanel() has been called. End result it
was not picked up and not acted upon.
It turns out update() is called after this flag is set, so
check for changes in the update() function.
Task-number: QTBUG-136687
Change-Id: I585cc82f2a177bb7708627102d3074a627d0f024
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
tst_qComboBox::popupPositionAfterStyleChange is no longer flaky on
Ubuntu.
Fixes: QTBUG-129029
Pick-to: 6.9 6.8 6.5
Change-Id: I3581fe73516d21d599dfb520fe53a0d855c811f6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
tst_qWidget::saveRestoreGeometry() is no longer flaky on Ubuntu.
Fixes: QTBUG-126495
Pick-to: 6.9 6.8 6.5
Change-Id: I65e12e958aa028237f56a9e7b3824e9aa837b799
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
tst_qFileSystemModel::sort() is no longer flaky on Ubuntu 24.
Pick-to: 6.9 6.8 6.5
Change-Id: I5a96cd06c78e2ff95d3d043cb6b11254946e5e19
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Add CMake variable to allow use of DESTDIR when installing examples
in a standalone example build and skipping the fake prefix that would
be otherwise used. Similar variable is already used for tests.
Pick-to: 6.9 6.8
Change-Id: I427cbb5c198f8e89b1685792b7c1d90413213254
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The qtwayland repository has been filtered for commits relating
to the Wayland client, via the following git-filter-repo command:
git filter-repo --paths-from-file wayland-move.txt --force --refs HEAD
And then merged into the qtbase repository via
git merge --allow-unrelated-histories
The following git-filter-repo instructions have been used:
src/CMakeLists.txt
src/CMakeLists.txt==>src/platformsupport/wayland/CMakeLists.txt
src/configure.cmake
src/configure.cmake==>src/platformsupport/wayland/configure.cmake
src/client/Qt6WaylandClientMacros.cmake
src/client/Qt6WaylandClientMacros.cmake==>src/tools/qtwaylandscanner/Qt6WaylandClientMacros.cmake
src/compositor/Qt6WaylandCompositorMacros.cmake
src/compositor/Qt6WaylandCompositorMacros.cmake==>src/tools/qtwaylandscanner/Qt6WaylandCompositorMacros.cmake
src/3rdparty/
src/3rdparty/patches/==>src/3rdparty/wayland/patches/
src/3rdparty/protocol/ivi/REUSE.toml==>
src/3rdparty/protocol/ivi/ivi-application.xml==>
src/3rdparty/protocol/ivi/ivi-controller.xml==>
src/3rdparty/protocol/ivi/qt_attribution.json==>
src/3rdparty/protocol/
src/3rdparty/protocol/==>src/3rdparty/wayland/protocols/
src/extensions/qt-shell-unstable-v1.xml==>
src/extensions/
src/extensions/==>src/3rdparty/wayland/extensions/
src/client/
src/client/==>src/plugins/platforms/wayland/
src/global/
src/global/==>src/plugins/platforms/wayland/globalprivate/
src/shared/
src/shared/==>src/plugins/platforms/wayland/shared/
src/plugins/decorations/adwaita/==>
src/plugins/decorations/
src/plugins/decorations/==>src/plugins/platforms/wayland/plugins/decorations/
src/plugins/hardwareintegration/client/
src/plugins/hardwareintegration/client/==>src/plugins/platforms/wayland/plugins/hardwareintegration/
src/plugins/platform/
src/plugins/platform/==>src/plugins/platforms/wayland/plugins/platform/
src/plugins/shellintegration/qt-shell/==>
src/plugins/shellintegration/ivi-shell/==>
src/plugins/shellintegration/
src/plugins/shellintegration/==>src/plugins/platforms/wayland/plugins/shellintegration/
src/plugins/CMakeLists.txt
src/plugins/CMakeLists.txt==>src/plugins/platforms/wayland/plugins/CMakeLists.txt
src/qtwaylandscanner/
src/qtwaylandscanner/==>src/tools/qtwaylandscanner/
tests/auto/client/iviapplication/CMakeLists.txt==>
tests/auto/client/iviapplication/tst_iviapplication.cpp==>
tests/auto/client/shared/iviapplication.h==>
tests/auto/client/shared/iviapplication.cpp==>
tests/auto/client/
tests/auto/client/==>tests/auto/wayland/
tests/auto/cmake/test_waylandclient/
tests/auto/cmake/test_waylandclient/==>tests/auto/cmake/test_waylandclient/
Done-with: Alexandru Croitor <alexandru.croitor@qt.io>
Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Task-number: QTBUG-133223
Change-Id: I46c325724141fdbfcc117d12fb5f92852613e72a
The spacing betwen the border and text in a QPushButton is a little bit
to small because the CE_PushButtonBevel is drawn with 4px less than the
size hint due to the rounded border. Therefore add the 4px for
CT_PushButton.
Pick-to: 6.9 6.8
Fixes: QTBUG-126515
Change-Id: Ie64225ad4734399b5da8bc4e73738592f32a7982
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
For Wayland protocols, "/usr/share/wayland-protocols/" is used on
Ubuntu/Debian derived, and same for arch. The share directory is
different with data and archdata directories.
Change-Id: I3bdd5bdc60bd4f66de66aecc943893978c86f19b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Follow 24d62ffd720b5bec5d07b07b8d2c9dda7635f3c0 for QVulkanWindow.
The Vulkan backend of QRhi has diverged from QVulkanWindow even
before that recent fix, having many changes over the years that
are not present in QVulkanWindow.
Introduce some of these now, to make things work with the newer
validation layer bundled with the Vulkan 1.4 SDKs.
Task-number: QTBUG-135645
Change-Id: Ic630e9a57c344843c171871b5a0386ed18027b22
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
VxWorks has POSIX pipe2 functions, but doesn't pass threadsafe-cloexec
because it doesn't have threadsafe-cloexec dup3. By default on VxWorks
POSIX pipes are used, but now it's possible to switch to PipeDrv
pipes using "configure -feature-vxpipedrv ...".
dup3 and accept4 test are now separated from threadsafe-cloexec test.
Task-number: QTBUG-132889
Pick-to: 6.8 6.9
Change-Id: I9e4514e2795917e8f3685a1760ea82a0022e9ca2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
moves setting QMAKE_DISTCLEAN to wasm/=.prf and only
remove files we create.
Fixes: QTBUG-134110
Done-with: Morten Johan Sørvig <morten.sorvig@qt.io>
Pick-to: 6.9
Change-Id: I4b62cd423fe7814f8a39d67ae98bb61111b0618e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Use QIcon::paint() instead retrieving a QPixmap from the icon and paint
it 'manually'.
Pick-to: 6.9
Change-Id: I4e8e47bf8d7fdffa8e65f93e3b8501074d831c43
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Replace all standard media icons with the icons from Figma/Qt Icon
Library.
Pick-to: 6.8
Task-number: QTBUG-128665
Change-Id: I8e3944f6536cac81a415e4891dcd2e0203fc2863
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Currently scalable images are rendered with the default size set in the
image and not the size they were added with QIcon::addPixmap(). This
might give scaling artifacts when the both sizes do not match at all.
Therefore set the wanted size through QImageReader::setScaledSize() when
(and only when) the reader supports this. Setting it unconditionally
will also force the scaling of pixel-based formats which is not what we
want.
Pick-to: 6.9
Task-number: QTBUG-135652
Change-Id: I2dc78587854b4c7c32438e0386385e980a9c4059
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QtCreator automatically removed this symbol when saving the file,
polluting my patch.
Therefore I put it into its own patch. As a driveby, I remove another
space at the end of the line.
Pick-to: 6.9 6.8
Change-Id: I407f9ebe5fb6c8bfa0285c0fcba929c8866b2251
Reviewed-by: Magdalena Stojek <magdalena.stojek@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Fix compile with feature_imageformat_xpm = OFF
Pick-to: 6.9
Change-Id: Id84c2050f27bbe43ae9710f4e23c52cc24dd3370
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Don't write an absolute prefix into generated .pc files but one that's
relative to ${pcfiledir}. This makes the files relocatable, and we don't
have to patch them in the Qt online installer.
Pick-to: 6.8 6.9
Fixes: QTBUG-136210
Change-Id: I5c2f9398917be03f6c63286e553c87ff52971285
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This is to avoid the need to use QFile (which is a QObject) in this
early code, especially since QObject itself may use category-logging.
Task-number: QTBUG-135326
Change-Id: Idc05974d06c2c0a973f6fffdadcc0ecbf76c5cbc
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We can use the existing QStringView-based rules parser. Additionally, we
can make this even better by avoiding the QString::replace() call and
simply tokenize on the semi-colon character (';').
Change-Id: I89d3890da482fc684abafffdd56ec17cad908f21
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The character escaping logic in writeEscaped() previously relied on a
long if/else cascade to handle escaping and error detection.
This change replaces the cascade with a switch statement, improving the
control flow. The loop now exits when a non-null replacement is set.
To support this, cases that previously raised an error without assigning
a replacement now assign an empty, non-null string to trigger the break.
Fixes: QTBUG-136681
Change-Id: I4a584738bcda741f881712547af12abd35e2fd0a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We have a function to check if a stream was locally reset - we should
realistically only process HEADERS on RSTed streams for a limited amount
of time. I forgot we had this mechanism in place already, let's update
to use it for the recent fix.
Amends 9224fdd3f4cccce7a8123ab398f6ff8745d759ce
Pick-to: 6.9.1 6.9 6.8
Change-Id: I4826100704542f681341ceb84c4f85332f8ae03d
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Amends 707129fd5a7c6390fbdf4270119226df2a427fcd.
This is much better for our string types because qHashBits() has a
faster implementation when seed!=0. The algorithm is the same, except
that QHashCombine now separates the seed from the combined hash, not
merging the two unrelated concepts together.
We can't fix it in Qt 6.x because it changes the hashing algorithm of
existing types that used qHashMulti(), which will have been inlined
throughout user code.
The deprecated constructor is there only until the rest of Qt is fixed.
Since this is a private class, that won't stay for long.
Task-number: QTBUG-134683
Fixes: QTBUG-134690
Change-Id: I2167e154f083089d12a1fffd61c1ab8670731156
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If we have no specific need for the private QHashCombine class, use the
front-end functions. For headers, we do have a need: we prefer
QHashCombine because it compiles faster.
Change-Id: I73578ea802d3b905a53bfffd504c20af0ca96cf8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
That's all non-primitives, except for QString, QByteArray and QChar.
Change-Id: I51d12ccdc56c4ad2af07fffd172bce38cc1a7998
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
On VxWorks 25.03 AT_FDCWD is defined but the POSIX at* APIs needed for
trash support are still missing. Update tst_QFile::supportsMoveToTrash
to verify that QFile::supportsMoveToTrash() returns false on
Q_OS_VXWORKS, regardless of AT_FDCWD.
Fixes: QTBUG-136693
Change-Id: I33f418984887d87e42ecda494cd5b101c42d55e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QByteArray is implicitly convertible to void* (!) so the void*
staticUpload overloads were accidentally selected, creating a deep copy
and defeating the purpose of QByteArray.
Fix this by calling the staticUpload functions with the correct number
of arguments.
Amends 5d857ed3bce64e4a7bdc5247c7dd9ca4495fb10b.
Change-Id: I5ab0baa53b764162ca44a3dd1dc6b1d5c68c7925
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The release is handled by the cache now.
Amends b1ed5f656f064e553b33752f8e87d2f5b9553e38.
Pick-to: 6.9 6.8
Change-Id: I1d4e13bbdffc732247f08a3d87dae6298155ba58
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Unconditional linking breaks build when widgets are disabled.
tst_localfileapi, tst_qwasmwindowstack, and tst_qwasmwindowtreenode
tests link against Qt::Widgets, but does not use them => remove.
Task-number: QTBUG-136101
Pick-to: 6.9 6.8
Change-Id: I6d895b5ddd85b3ace98e0e398d034006aee236e0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>