Commit Graph

69179 Commits (fc96ce3a2b4b669dd69df59e618a951537804c27)

Author SHA1 Message Date
Christian Ehrlicher fc96ce3a2b QDateTimeEdit: use correct size hint when calendarPopup is enabled
When calendarPopup is enabled, a QComboBox instead a QSpinBox is drawn
but the size hint for QSpinBox was used which resulted in a too small
width for the widget (depending on the underlying style). Therefore use
the size hint for CT_ComboBox in this case as it was already done for
mac.

Fixes: QTBUG-11967
Change-Id: I817bdc99ae5d1189b9f0451a857022abe64b3bf8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0a1c1711453697a88eee7fdb6f4cf082bfd433e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-07 01:13:51 +00:00
Thiago Macieira 590ac5b4a1 tst_QObject: don't leak QtDeclarative::theData
Change-Id: I347f7558a3b278590b11fffdc48877791c29ca60
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ee3933a3ddb032e8d62eb5ac920f9450e7dc2f45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-07 01:13:51 +00:00
Alessandro Astone 50aaa93c85 a11y atspi: Watch for enabled status change
On log-in this may be disabled and only enabled later; that prevents
clients like plasmashell to enable a11y features.
We need to watch changes to the org.a11y.Status properties and enable
the a11y integration on-demand.

As the in-line comment said, qdbusxml2cpp does not generate NOTIFY
signals for DBus properties, so use the raw PropertiesChanged signal
to receive those notifications.

Downstream bugs:
- https://bugs.kde.org/show_bug.cgi?id=495096
- https://bugs.kde.org/show_bug.cgi?id=495098

Pick-to: 6.7
Pick-to: 6.7
Change-Id: I4d0adf61af875464d3cd47759631d2a3aac664f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 38251c36edf11316a2467169b1d491bf13520fd3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-07 01:13:50 +00:00
Marc Mutz 78dfb5f196 QDomNodeList: mark op==(Private) noexcept
It is, because it only compares a pointer and a string, both of which
are nothrow_equality_comparable.

Also remove the unused (even in C++17 mode) inequality operator
instead of marking it noexcept, too.

Pick-to: 6.5 6.2
Change-Id: I0ce62df02ffc98252d17cef659cc6dc2a90ae2cf
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3fce04157dbba1232d96821dbb166c6a5dc467a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-07 01:13:50 +00:00
Timur Pocheptsov 3502790551 tst_QNetworkReply: add more checks for blocking keychain
There are more tests that create TLS server and can potentially
fail in case SecureTransport backend is in use.

Task-number: QTBUG-130500
Change-Id: Iaf2071c19f3cc0d3617bfc8c484b464c1a212d5a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 81e7d3f95a1646d91d126596d0d7d6acf106298a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-07 01:13:50 +00:00
Wladimir Leuschner 61c67cf499 QWindows11Style: Fix sorting arrows in headers
Fixes: QTBUG-126345
Change-Id: Ifb0bb46329a909fd113318f61ca37ba01f4d873d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 81642477d979e00f9507df37184e75d9ed98ee2f)
2024-11-06 15:46:44 +00:00
Volker Hilsheimer cd48b781d1 StyleSheet baseline test for TreeView: include one with empty area
So far, the entire tree view was filled with items, so we didn't see how
the empty area below the last item was rendered. Take a screen shot of
the tree after giving it twice the space it originally has to get some
empty area included as well, without breaking existing baseline images.

Task-number: QTBUG-123632
Change-Id: I50714c0b3b04f4b1844e52063d0c0c77ff2d7154
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 4be99b1900f3ba7414a9acbc4777a669fcbd8e3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-06 15:06:19 +00:00
Volker Hilsheimer d4948d354f StyleSheet/QTreeView: draw empty area and background of semi-transparent items
After 3ca615d9735f7ddb8e2ae5c13e5effd419a56300, the style sheet style
will not draw rows unless the item has a border. Otherwise, it will
assume that the item drawing later on will fill the background anyway.
We also never painted the background for empty rows.

However, if the item's background is semi-transparent, then the row
needs to be drawn first, so that the correct background shows through.
And for empty rows, we need to draw just the background. This is
especially important for trees with alternate background colors.

Add baseline test case for this particular combination. This will result
in a minor change to the results of the existing
transparentBackgroundNoBorderForBranchIndicator test case, where now the
background is drawn behind the indicator area when the item's background
is semi-transparent. I don't think this is a bug though.

Fixes: QTBUG-123632
Change-Id: I2cd4efb748aaefc03a3b576458b750ee47479e97
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit b780eaf6a063a7efe03417cf6b7008a188e222a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-06 15:06:13 +00:00
Ulf Hermann d883d771f1 libinput: Print qsizetype through %PRIdQSIZETYPE
Otherwise it's wrong where qsizetype is 32bit.

Amends commit 3941fe697b.

Change-Id: If80b01bb188659509c42f950e803de9e1f36400a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit f5cad8035d04b7d10d879369d327917c2fef8141)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-06 13:16:41 +00:00
Christian Ehrlicher cdd61111cf Fusion style: remove unused variables in CE_TabBarTabShape
Remove some unused variables in CE_TabBarTabShape - they are not used
since the initial Qt4 import.

Change-Id: I2ec4ee8ac9bfdde9d40587c50eb6d57bf38419ac
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4c0b45553862d3eff35906d02ea5e2afd9252bbd)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-11-06 10:33:46 +00:00
Shawn Rutledge 3544fa163f Restore event replay when a popup is closed by mouse press outside
If a popup (such as a context menu or combobox) is open, and the user
presses any mouse button outside the popup, Windows users expect the
mouse event to be sent to whatever is under the mouse, while the popup
closes. (So the popup must close on press, not on release.)
QPlatformIntegration::ReplayMousePressOutsidePopup requests this
platform-specific behavior in general, and the WA_NoMouseReplay
attribute can disable it on specific widgets.

e4ef0f03e6 removed this feature which was
added to Qt 5 in 1f456b4cbb, based on
doubt that we really needed it: and if we did, maybe we would need it in
QtGui. But so far it seems the main excuse for doing it this way is that
popups are sometimes opened with exec(). If the nested event loop
handles the mouse press completely, and the QPA event is discarded, the
outer loop has no chance of seeing it after exec() finishes.
In Qt Quick, we don't use exec(); so let's assume that this continues to
be needed only for widgets.

At least we don't use extern sharing of a global bool in this version.

Fixes: QTBUG-130138
Change-Id: I95b5d24ee9bc8608655ed5c585d1d91a891fbad3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 601924cce57ee564ec149a170f1987b13924e0ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 22:06:00 +00:00
Marc Mutz d480177789 Make QSpan::isEmpty() constexpr
Negligent omission, since empty() is constexpr, and so is everything
else in the QSpan API.

Amends 03e78e5d62.

[ChangeLog][QtCore][QSpan] Fixed isEmpty() to be constexpr (empty()
already was).

Change-Id: If1e1e72422d68b0c35c37354067098332e6e4e10
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 0576c2b7266003d8f17e9af896de15cf7184b858)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 18:53:19 +00:00
HIDAKA Takahiro f3f9b2ea8a iOS: Replace usage of deprecated QPointerDevice APIs
Replace usage of QPointerDevice::setType to constructor.

Fixes: QTBUG-129981
Change-Id: I757ec3cde7815363539b8cfe3fd7ae46993ce33e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cc24213bdb286b200ad1c637ed244c48a2a32495)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 18:53:17 +00:00
Marc Mutz 44d4d2593c tst_QPromise: don't rely on move-only lambdas
VxWorks, at least as used in the 6.8 CI, has a problem with move-only
lambdas passed to QThread::create(). This might have been the reason
for the resurrection of the cxx11_future feature in
408430a543ef605157963b1a894847c7ba9f9956.

This patch tries to work around the issue by not moving the promise
into the lambda capture, but caputuring it by reference, and then
moving it into a local stack variable. In all cases, the ThreadWrapper
is created after the promise, so, since the ThreadWrapper dtor join()s
(like jthread), the promise out-lives the thread, and the destruction
of the promise happens-after the join() with the thread. So, no data
races. Code mustn't touch the promise object from the main thread once
the ThreadWrapper has started, but that's the case already and the
test functions are small enough for any such future use to be obvious
in review.

Amends 385f0732d9 and
4e1b20893aeeb9580bc6b52ac4baea297675bfee.

It appears that dev no longer has the problem¹, but apply this to dev,
too, to maintain consistency with the test in last three LTS releases.

¹ 4e1b20893aeeb9580bc6b52ac4baea297675bfee passed, but its cherry-pick
  to 6.8 did not

Pick-to: 6.5 6.2
Change-Id: If1feba9d3a7f8677789d45fa9f4990cf44145709
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4d6cf54664a98e01d4caab42431c62d6deb9f86e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 18:53:16 +00:00
Laszlo Agocs 73f17bf499 eglfs: Restore raster window support code that went missing
Restore the snippet added in 4bc8f54822

Amends 0a10d23c4a49dd14a1ded41b7cc6921909b0ee7a

Change-Id: Id83ff523e6343003c198600fe0ee91a71fb6e3e0
Fixes: QTBUG-129512
Reviewed-by: Inho Lee <inho.lee@qt.io>
(cherry picked from commit ad50ca7d9ed3644454904488dc4719ca446e8091)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 17:44:28 +00:00
Safiyyah Moosa 50f507eb44 Doc: Clarify run() and started() order in QThread
This fix addresses a customer suggestion to clarify the QThread()
documentation. It now states that started() is emitted by the newly
started thread, so any slots connected to it will occur by queued
invocation. For clarity purposes, an additional sentence has been
added to state that whilst the event may have been posted before
run() is called, cross-thread delivery of the signal may still
be pending. A link to 'Signals and Slots Across Threads' has also
been added.

Fixes: QTBUG-112221
Pick-to: 6.7 6.5
Change-Id: Id502eb4bf48b745af4d9906d7cd05de73d2b6418
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 371872af23c1c9f9b3b56dd191fb13f850615dd4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 16:32:50 +00:00
Bartlomiej Moskal e2e20c19f6 AndroidDeployQt: Remove not satisfied dependencies
In 438837ce27 commit, we stopped to copy
all dependent libs that are kept in plugin directory. This change sounds
reasonable, as we do not want to deploy unused libs.

Due to the mentioned change, when dependencies.xml contains *.so
libraries, they are not copied at all now. They are added to localLibs
(later pasted into libs.xml), but are not shipped with the apk.
So at the end we have dependencies in libs.xml on some libraries that
were not delievered.

This commit cleans up the localLibs to not add dependencies to the
libs.xml file as they will not be satisfied

Fixes: QTBUG-129946
Change-Id: I7157e2e65cb928adbe9d7c077e50b2ebcac94490
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 7499fd0229d63f969bf6ca58d3b764b96395bed2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 15:37:24 +00:00
Tor Arne Vestbø 683d839f14 visionOS: Handle CNAuthorizationStatusLimited for contacts permission
Change-Id: If6565d9cc3303b2a3ec7140d67d3a773ea64fff9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
(cherry picked from commit 6cc0b775def78cb92705b65c0bc7abd0ad673049)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 15:30:22 +00:00
Christian Ehrlicher 7c34903e4b QCommonStyle: adjust painting CE_ComboBoxLabel text
Sync the rect used for painting a CE_ComboBoxLabel text with QLineEdit
which is used for an editable QComboBox.

Task-number: QTBUG-130824
Change-Id: I9f3a31d68c6abed7e9cba4235847df3fa0d51ad1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit dc1ae86bad0b4eaa83909f663777c09fb2f2376b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 15:30:22 +00:00
Eskil Abrahamsen Blomfeldt b3aa4b32b0 Revert "freetype: Fix scaling layouts with bitmap fonts"
This reverts commit b492582b9c.

The fix made Qt Quick applications work correctly, but it caused
all text in bitmap fonts to disappear on Qt Widgets. This needs
a deeper investigation, and until a proper fix is found we will
revert.

Transformed layouts with bitmap fonts will still look incorrect,
but they will at least have text.

Fixes: QTBUG-130586
Change-Id: I7429ddd183527f2ed5d1c00009a0c3df0e3246c8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 2f9b02acd4cbca5d8c0d7504df4c9e7bcbbb03ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-05 15:30:22 +00:00
Edward Welbourne cff042eb53 Correct an earlier pick
Amends commit 52909797ac, whose conflict
resolutions inadvertently incorporated the movement of IANA IDs from
the list table to the IANA table, a change only done on dev (6.9), not
picked back to 6.8, but tagged with a # TODO comment in 6.8 that, none
the less, is not to be done in 6.8.

Restore writing to the correct table.

Change-Id: I70fd133eb54526efecae189306b3ae07c1c638db
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-11-05 12:58:43 +01:00
Christian Ehrlicher b63615ca6c Windows11Style: fix sizehint for QComboBox
The size hint for QComboBox relied on the vista style but the painting
was completely different. Therefore swith to the base windows style and
add the extra margins used in the windows11 style.

Fixes: QTBUG-130824
Task-number: QTBUG-11967
Change-Id: Ic533140793cdd4e640c49f6d73e9bb73bcbb83da
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b6ca35f65372cc8519a418d6a5291cafd809f7c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-04 22:30:19 +00:00
Christian Ehrlicher 81ba262a62 SQL/Mimer: simplify uuid conversion
Simplify converting a QUuid to a rfc4122 representation by using the
built-in toRfc4122() function and don't allocate a temporary QByteArray
when converting it back from rfc4122 to a QUuid.
As a drive-by make sure to not detach when converting a QByteArray to a
blob.

Change-Id: Ib8fc7744952377d14ef39c0d901a6a8419eb018d
Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 814e4e1cbe6e4a625625942c70b394aa6455fb19)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-04 22:30:19 +00:00
Friedemann Kleint cb0ac3d471 Tests: Reduce the number of module includes
They are an unnecessary hit on build time.
Rewrite the tests using the standard Qt conventions.

Change-Id: Iac47e62c58b1805c3b4a0ac4f4b3db206c66cc65
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6ddf74716d7b2fe0df5dd9c0172f9ecf936d5c5d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-04 19:42:27 +00:00
Tor Arne Vestbø 1696091c5b macOS: Update NSOpenGLContext drawable on beginning of frame if needed
If the size or DPR of the window we're drawing to with QOpenGLContext
changes we need to call [NSOpenGLContext update] to recreate the backing
texture.

We were doing this in QCocoaGLContext::makeCurrent(), based on the
assumption that clients would always call makeCurrent() before drawing,
which is a documented requirement of QOpenGLContext:

  "To be able to support certain platforms, QOpenGLContext requires
  that you call makeCurrent() again before starting rendering a new
  frame, after calling swapBuffers()."

However RHI doesn't follow this rule, and skips makeCurrent() from
QRhiGles2::ensureContext() if the context is already current.

This was causing issues when moving a window between screens with
different device-pixel-ratios, as we were correctly rendering to
the window with the updated DPR, but we had not resized the target
texture to match.

Changing QRhiGles2::ensureContext() might be an option, but nowadays
we have QPlatformOpenGLContext::beginFrame(), which is guaranteed
to be called (by RHI, not by generic QOpenGLContext clients).

To cater for RHI we now call [NSOpenGLContext update] also from
the beginFrame callback.

Fixes: QTBUG-114873
Pick-to: 6.5
Change-Id: I9461135109fb1473ef9965f72f52beeb41b03680
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 48c176e1b891428af504087b117a72bcaa806930)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-04 19:42:24 +00:00
Volker Hilsheimer 945c8bf54d Cocoa: Use sheetParent to close sheet instead of transientParent
If the window that the sheet (as created for a modal dialog) lives in
has already been destroyed by the time the sheet is hidden, then we used
to trip an assertion. Instead, always use the sheetParent, which is
still alive.

Add a test case that asserts without the fix.

Fixes: QTBUG-128302
Change-Id: I4c399b73e2552bab79358c5505f403efa8e4f80b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 332f49f2d8c5675bab8bde6acfb377d567961d4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-04 17:48:56 +00:00
Tor Arne Vestbø 076f89744e Blacklist tst_QNetworkReply::ioHttpRedirectPolicy on macOS 15
Task-number: QTBUG-130500
Change-Id: I92785306f2ecde357c6f4c54419f76643f69e1da
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 57eabffbc9543a1ff1b163a7108d8fbbc8b29878)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-04 16:53:32 +00:00
Assam Boudjelthia 6aca2efd62 CMake:Android: add wrapper scripts to easily run apps
Create a script that allows running an app or a test easily similar
to running on host. This improves development workflow and time by
allowing quick runs without having to manually call the various adb
commands to launch, get a pid of the app and then print the logcat,
let alone passing parameters or environment variables.

For normal apps, the app package name is retrieved by the script, run
and live logcat is printed as long as the app is still running.

For tests, the script calls androidtestrunner, allowing test parameters
to be passed to the test.

For CI debugging, this would save quite a lot of hussle and frustration
trying to run or debug a test app.

One other benefit for this is enabling running Android tests from Qt
Creator's testlib plugin without big changes to Qt Creator to support
androidtestrunner explicitly.

Because file(GENERATE) would fail if called twice for the same file,
I use file(WRITE). This is used because at the time of calling the
target executable finalizer, we don't know if the target is a test
or not, so we rely on writing the script first as a normal target,
then call it if the target is a test where it overrides the script.
For this also, parameters passed to the runner or androidtestrunner
can't handle generator expressions.

[ChangeLog][CMake][Android] Add wrapper scripts to run Android apps and
tests with ease from the host.

Task-number: QTBUG-129889
Change-Id: I84e85ce2bbf6944c8aa20bdc2c2b6d7b956bc748
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a905d26f14da1cf86b8490331c0cc41c2a45b283)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-11-04 11:00:57 +01:00
Eirik Aavitsland 075b3f16e2 Fix QImageIOHandler autotest for static builds
Some of the new imageIO plugin tests recently added would fail in
static builds, since the search order is different then.

Fixes: QTBUG-130739
Change-Id: I074bb1bd314e8ff9a6ea90ba0cd27985aca5ad75
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 8f5ee7acbdf957ecb4568927df24bd5076da3262)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 22:17:25 +00:00
Olivier De Cannière a6f4af0921 TestLib: Wrap raw strings in QStringLiteral for QT_NO_CAST_FROM_ASCII
This enables testing of qmltc with QT_NO_CAST_FROM_ASCII.

Change-Id: I0a6655522b0edaa79dc606b70c263b83ad14ee0b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 33a80b27b343fb02d365520a352843a84dd851fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 19:35:18 +00:00
Alexandru Croitor 28a5486d53 CMake: Add doc_tools build and install targets
Add doc_tools and install_doc_tools custom targets.
These are meant to build and install documentation and code generation
tools that participate in documentation generation.

Such tools should be annotated with the IS_DOC_TOOL option to their
qt_internal_add_tool call.

In qtbase, such generator tools are qdbusxml2cpp and qvkgen.

Task-number: QTBUG-91243
Task-number: QTBUG-128730
Change-Id: Idebffc6f50d8547ce76c1102a20d60d436e44cfd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3066e9e38deada5f99a47449e4ef84eebc5219f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 20:34:37 +01:00
Wladimir Leuschner 6e6d42a3b3 QWindows11Style: Respect background color for flat QPushButtons
Fixes: QTBUG-128781
Pick-to: 6.7
Change-Id: I634d42566ea6249b125da537ac7e60fbd8475635
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 0b1275f630b5d03f314bc02879301df95b3f1940)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 19:34:31 +00:00
Wladimir Leuschner f1bab31ff5 QWindows11Style: Don't set FramelessWindowHint for QScrollbar
QScrollbar is a widget and not a window, therefore there is no need to
set the FramelessWindowHint

Fixes: QTBUG-128518
Pick-to: 6.7
Change-Id: I687c708cd4f59c6f09d0ad3c2d3ddcf62c33b11a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 7b146e530adc913a1ed49b4d2ba17de787089261)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 19:34:29 +00:00
Jaishree Vyas 12e30532de Doc: QString::slice uses the wrong snippet
Changed the number, which caused the problem of showing the snippet.
Two of the same numbers were given to the different snippets.

Fixes: QTBUG-130565
Change-Id: Iba738a1bdaf5821df48bf5e222bee911c5ddf1fc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b3e5b134eeaae85025879cd0309664ce0ba1f6de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 16:25:07 +00:00
Eskil Abrahamsen Blomfeldt 3b9f202539 Freetype: Fix artificial oblique combined with other transforms
When applying an "obliquen" transformation with Freetype, this
applies a 12 degree horizontal shear on the control points of the
glyph you have loaded.

However, any other transformation we set on the glyph will be
applied when loading it. So if you have e.g. a rotation on
the glyph as well, then this will be applied first and the
rotated glyph would be obliquened instead, now along the wrong
arbitrary axis in the rotated coordinate system.

To fix this, we detect the case where a transform is applied and
multiply in the obliquen in advance. It means we have to duplicate
some code from FT_GlyphSlot_Oblique() which might get out of
sync (if the slant angle changes in a newer version for instance).

We limit this to the cases that are currently broken so that we
avoid messing with any working use cases.

[ChangeLog][Text] Fixed an issue where artificially obliquened
text would look incorrect when other transformations were also
applied and the Freetype backend was in use.

Pick-to: 6.5
Fixes: QTBUG-97436
Change-Id: I61c5d007e9ea9be2beb283a8b8abbed7723bab38
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit db8230715aa115dc2da5177bb1824fb40c5f2569)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 16:25:07 +00:00
Timur Pocheptsov d990f697b5 network-helpers.h: add a missing include
For QOperatingSystemVersion

Change-Id: Ie8a7e632b9485111469a2bf1a6407491e29d7229
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 2ab35ca62faf8a12e8ededa77e028c585363c3cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 16:25:06 +00:00
Thiago Macieira e080017c72 tst_QThread: add a test for multiple threads wait()ing for one
There's nothing in our documentation saying this is permitted, but we
have specific code for it on Windows and it works on Unix because we
just wait on a QWaitCondition.

Change-Id: Id6331fa9aad473cb4f35fffdf8bb04d9a34cd108
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 5b5297fe87859f59a7aaf5e86a8915c00714fefa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 16:25:06 +00:00
Thiago Macieira c68c0fb64c QWaitCondition/Unix: fix execution with negative deadlines
pthread_cond_timedwait() doesn't like it.

Change-Id: I37ae26948fbc72fd1028fffd107e561cc54c4553
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit d60472c2c436fc464d5a1b81538967676f71b6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 16:25:06 +00:00
Joerg Bornemann d614b12da6 CMake: Report success for 'separate_debug_info' where applicable
Don't disable the separate_debug_info test but mark it as successful on
Apple platforms and MSVC. This enables us to simplify the condition of
the separate_debug_info feature. Also, we fix the error on MSVC when
passing -separate-debug-info to configure.

Fixes: QTBUG-108015
Change-Id: Ifb1f18b2be8a0b5693a3448c1b8198f773f94ffb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f663a08f2067f7890e4b71fd1137791a7e96c613)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 16:25:06 +00:00
Ivan Solovev 0f2afeba04 Docs: fix documentation for deprecated QDateStream::readBytes overload
The patch that introduced the deprecation lost '!' at the beginning of
the comment block. As a result, the documentation for the deprecated
method was not generated at all.

Amends cbc6ee0eb9.

Change-Id: Ief2f4aae7e21363224fa44ef42847aa132ea769a
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
(cherry picked from commit 4ce7235fdd6183478eebfcf2f1d6058a172b285a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 16:25:05 +00:00
Alexandru Croitor 45c8ab1149 CMake: Split target finalization code into a separate function
It was duplicated across a few public API.
Splitting it will also allow it to be be reused in a future change
in another function.

Also add the ability to use the poor man finalizer approach for
CMake 3.16, but only via an opt-in that will be set by the qt build
process, so that the finalizers can be used for tests in a future
change.

Task-number: QTBUG-93625
Task-number: QTBUG-112212
Change-Id: I097faf5e3db98457acfdfb3ae2011efb6640f35e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 2bbc0bda30e0c34ea63f0b6836c34c765a06e049)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 14:49:16 +01:00
Alexandru Croitor ef3db62459 CMake: Add an install_tools target for static builds
We offer a build target called 'host_tools' to build just host tools
and their dependencies within a Qt build, but it was not possible to
easily install the built tools.

Add convenience custom targets called 'install_tools' and
'install_tools_stripped' to install the host tools when building
a static Qt build.

The convenience targets will be useful for qdoc static builds, to
easily be able and install the tools, without having to specify each
tool's install target separately.

The current approach doesn't work for shared Qt builds because it
would necessitate tracking the libraries that the tools depend on, so
those are installed as well.

So for now, this is limited to static builds only, where there
are no shared library dependencies that have to be installed.

The implementation passes 'host_tools' as an installation component
for qt_internal_add_tool installed targets. The custom target then
just calls cmake --install with the component name.

Task-number: QTBUG-91243
Task-number: QTBUG-128730
Change-Id: Ic047ec3b8683043f496b4b2c3cf883a3e70440b3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c64190caa7d515e0efc60a3c435d9d779efd5ac3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 14:49:16 +01:00
Alexandru Croitor ff0285ce6b coin: Build qdoc as part of repo instructions for CI doc building
Backstory.

The current approach for building documentation in the CI is that we
build a static qdoc in a Jenkins job, manually provision it in
qt5.git, and then build qt documentation using that somewhat
old qdoc version.

Updating the provisioned qdoc is a very slow process, because changes
first need to be merged into qttools, then a Jenkins job needs to be
manually run, then provisioning needs to be updated, and sometimes it
also depends on a full qt5.git submodule update or has to wait for
other unrelated changes to qt5.git.

The new approach.

This change adds CI instructions to build a static qdoc (and
other relevant tools necessary for documentation generation)
using the latest qttools/dev/HEAD sha1 in a specific host platform's
qtbase build instructions, and then uses those tools for documentation
generation and doc warning checks in each repo's TestDocs CI test
phase.

To enable these new instructions, the host platform and the doc
checking platform need to be tagged with the 'DocsGenerationV2'
feature.

The built tools are cached in a separate archive using a new Coin
feature, which is then extracted during each repo's TestDocs phase.

Pros and cons.

The benefit of this new approach is that we will always use a mostly
up-to-date qdoc from qttools/dev/HEAD when generating documentation,
making the documentation team's life easier.

Specifically, once the doc tools are built in qtbase with the latest
qttools/dev/HEAD sha1 that was available during that integration, the
resulting built tools are then used for doc checks in dependent repos.

A newer qttools/dev/HEAD sha1 will only be used for a particular
repo once the qtbase dependencies.yaml sha1 is updated, or when doing
qt5.git changes that cause a rebuild of qtbase.
Note that while new tools are built due to dependency updates, the
used qttools sha1 is not recorded in any way in any of the
dependencies.yaml files.

qtbase doc checks will always use the latest qttools/dev/HEAD sha1 at
the integration time, because the tools will always be built from
scratch.

The downside of the new approach is that, by default, the doc
generation will not use a pinned version of qdoc anymore,
but rather follow the flow described above. This has a chance of
introducing failures which are unrelated to integrating changes.
This should happen rarely because the doc team usually tries to fix
doc warnings before changing qdoc's code.

If temporary pinning of qttools or qt5.git is required when testing the
docs of a specific repo, it can be achieved as follows:
- set the QT_CI_BUILD_REPO_DOC_TOOLS env var to "1" in the repo
  coin/module_config.yaml file build instructions, to ensure the doc
  tools are built in that repo, rather than reuse the ones built in
  qtbase

- set the QT_CI_DOC_TOOLS_PIN_GIT_REF env var to the desired qttools
  sha1 or other git ref, in the same build instructions phase

- optionally set the QT_CI_DOC_TOOLS_TOP_LEVEL_PIN_GIT_REF env var to
  the desired qt5.git sha1 or other git ref, in the same build
  instructions phase, if a different version of qt5.git is required

- optionally set the QT_CI_DOC_TOOLS_USE_CI_TOP_LEVEL_BRANCH env var
  to ON, in case if the module branch that the CI job computes should
  be used as the qt5.git branch

- set the QT_CI_FETCH_REPO_DOC_TOOLS env var to "1" in the repo test
  instructions, to ensure the just built doc tools are fetched instead
  of the qtbase-built ones

Test running this new approach will allow us to collect some feedback
on how often breakages happen, and how much easier it makes the
documentation team's work, or how much harder it makes the life of
regular integrations.

The abundant amount of optional pinning options should be enough to
avoid any permanent integration dead locks.

Task-number: QTBUG-128730
Change-Id: I8606cb3076036a4a0ec652d0fa74d270e8f5dfdf
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 1f646bb978ed94c25f6224e801779c929096c0ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 14:49:15 +01:00
Alexandru Croitor 32a6d50301 CMake: Allow specifying an optional host tools path for doc generation
Introduce a new QT_OPTIONAL_TOOLS_PATH cmake variable that can be set
to a path where some of the documentation generation host tools might
be located.

This allows using specific builds of qdoc, qvkgen, qdbusxml2cpp and
qtattributionsscanner for documentation generation.

QT_HOST_PATH wouldn't be sufficient in this case, because it requires
all host tools to be installed for the given path, otherwise
configuration will fail

In contrast with QT_OPTIONAL_TOOLS_PATH we can specify the paths only
for the tools listed above, while continuing using other build tools
from the usual locations, either built or found.

As a drive-by, fix the usage of CMAKE_EXECUTABLE_SUFFIX to be based
on the host platform.

Task-number: QTBUG-128730
Change-Id: I2796be3a9772b106788ce63a4aed890516e8b716
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit aab8b7727d8acff989dbdf9b01ca7fb2b12da541)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 14:49:15 +01:00
Alexandru Croitor de6615057e coin: De-duplicate test docs instructions
Add a new coin_test_docs_common.yaml file that contains the common
instructions for configuring a documentation warning build.

Task-number: QTBUG-128730
Change-Id: Ifc86570f3c98e64364f3c2c2bb71f45eaaee0c19
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 3da46b5fc2ea04be85c458f9eac88dbe1f091757)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-11-02 14:49:15 +01:00
Alexandru Croitor 1e2069b3b3 CMake: Add a script to build qdoc and friends from qttools/dev/HEAD
A new QtBuildStaticDocToolsScript.cmake script is added which:
- clones qt5.git
- initializes required submodules for building doc tools
- checks out qttools/dev/HEAD
- syncs the dependency SHA1s as specified in qttools'
  dependencies.yaml file
- configures qt5 as a top-level static build
- builds qdoc and other tools required for documentation generation
- installs them into a custom prefix under a subdirectory of the
  repo's root build dir.

The script is intended to be used as part of qtbase's CI build
instructions. See the follow-up coin change for reasons on why we want
to do that and how to configure optional ref pinning, instead of using
dev branch always.

Task-number: QTBUG-128730
Change-Id: I836fc2f1b47c07171d2a2bd54a85bc2145212e46
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f7f02c791bcbee44597f1fe24570ebdf352ec648)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 14:49:15 +01:00
Toni Saario 3a665a308d Revert "Coin: sign only x86 packages"
This reverts commit 8d5e7d50d8.

Reason for revert: Arm packages should be sign-able now.

Change-Id: I6a896bfd84927da9c15647d207a6ad5024a27949
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit a33811ee8d746d70a7eba4ba8b1d321ace96f741)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 13:49:14 +00:00
Tor Arne Vestbø cfa9691cba cmake: Always export Apple version requirements
The full set is needed, on all platforms, so that we can use them
during documentation builds.

Pick-to: 6.5
Change-Id: Ie555094a8e365fada7e43da6899e312d774eadb2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 179982a81a292bfe3f9dc16888f7c9777f1b2251)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 13:49:14 +00:00
Tor Arne Vestbø 01d5246695 cmake: Set all Apple version defines in .cmake.conf
Allows us to pick up these defines when building documentation on
non-Apple platforms.

Pick-to: 6.5
Change-Id: Icd1029e87a56ecfa81875f024a7d959250cd9bbe
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 0c1c3dfad2cf435bde81c11545ad28b73956253c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 13:49:14 +00:00
Tor Arne Vestbø 918cd43a84 doc/cmake: Allow passing additional defines to qt_internal_add_docs
Useful to base documentation on data known to the build system,
such as the macOS minimum deployment target.

Pick-to: 6.5
Change-Id: I280f3b34e935c878321c24936a52dce406fdf014
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit db9bd4ab3ba80d8bd31fcdb3fc6f93ed8332a9f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 10:12:29 +00:00