Commit Graph

68598 Commits (fbf052132ea06e89faa4ceecee85c43c7ec6f61a)

Author SHA1 Message Date
Ahmad Samir fbf052132e QObject: fix API docs
Should be just "timer" instead of QChronoTimer.

Change-Id: I76cb9ae712cfe9a9713a85888022e54300d308d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a5f1cec8bf22f19bbf7ffe058c407d5045e4126a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-02 18:10:38 +00:00
Christian Ehrlicher da87068f7f SQL/Doc: improve documentation on building and debugging a sql driver
Add some notes on the prerequisites when building a sql driver from
source and also add some more notes in the troubleshooting section.

Pick-to: 6.7 6.5
Change-Id: I8ffbcf4182c2ad2c7b9f86209e0ce332fd27d73c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1f31c5f3cd722f06e4f41457ec1322365d78c018)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-02 15:18:44 +00:00
Ahmad Samir c9fe636dfc QBasicTimer: port to Qt::TimerId
[ChangeLog][QtCore][QBasicTimer] Added id() method returning
Qt::TimerId.

Fixes: QTBUG-128144
Change-Id: Idbe29311cca3befb771dbf1ef976a42e65e59ce9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 751cbbd6b13d9899e31c19d9db80d1c64a72a8bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-01 10:51:01 +00:00
Ahmad Samir 0945ca9a01 QObject: code snippets cleanup
Use chrono literals; remove comment about C++14.

Change-Id: I1594780946dd3e646b5a4f68dad4996f0572f317
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 81e3d10ca5913a79f5e53043bfd33d03f25253f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-01 10:50:55 +00:00
Ahmad Samir 91ed5ddff5 QObject: use Qt::TimerId in the code snippets and API docs
Mention QTimerEvent::id(), which returns Qt::TimerId, instead of
QTimerEvent::timerId() which returns int in the API docs.

Task-number: QTBUG-128144
Change-Id: Id19aebd044fbd734872e5580efcb3842eb42b2b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7595c21be86f247dd419d08d7d26327fe2d7a736)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-01 10:50:50 +00:00
Ahmad Samir 0bd6bbedea QOperatingSystemVersion: add trailing comma to last member in enum
Task-number: QTBUG-125859
Change-Id: I374d7e676765cc00788224d980a29c16a6330648
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8c2dcfc79aaa812ae671304c39d006ed6782cb74)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-01 10:50:45 +00:00
Christian Ehrlicher 3b208bcfa5 QGenericUnixServices: properly disconnect signals in dtor
Since QGenericUnixServices does not derive from QObject, the connection
to QDBusPendingCallWatcher made in the ctor might outlive the lifetime
of QGenericUnixServices.
Fix it by explicitly disconnecting it in the dtor.

Fixes: QTBUG-125239
Pick-to: 6.7 6.5
Change-Id: I5fac4fd5831b2dde16b3d7b479a8ee616bfb7e3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit de609d84b9cee4a481d1718c00b09105d8c2ae69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:57:09 +00:00
Marc Mutz 0396def8ad Make Container::max_size() non-static member functions
... as is required by the standard.

We have already found that QAnyStringView::max_size() can also not be
static (because the size depends on the charset of the contained
data), so we have a second reason (besides STL compatibility) to
change the current static into non-static max_size() member functions:
Qt consistency.

Found in API-Review.

Amends 7ce6920aac.

Fixes: QTBUG-128450
Change-Id: Id5ee3fec82bc557bd83b6843838ccdd753442cd0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6d5e39f4756945b8ada74d745bd949856c1b17f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:46 +00:00
Edward Welbourne bcd33276d1 Include relevant Unicode Inc. copyright line in generated data files
This amends commit 880d1aef99 and
extends it to cover the testlocales program under util/.

Pick-to: 6.7 6.5
Task-number: QTBUG-121653
Change-Id: I3efadc69ce08810876f8e20aa4636c7624728153
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 00644f4b6d69d82a8d27f3b0619de88c0e4fdd6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:42 +00:00
Ahmad Samir e97da8bc9d QChronoTimer: compare timer IDs to Qt::TimerId::Invalid consistently
Always `if (id != Qt::TimerId::Invalid)`.

Change-Id: If16e1cb54d3e7b4325019eb292263c25cd7d3805
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 637fcc69c87352c21658fea1083e93786f64fc37)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:39 +00:00
Thiago Macieira cb35f1e858 Containers: add a static constexpr maxSize()
max_size() will be made non-static to strictly follow the C++ Standard
Library concept, but it makes no sense for the Qt containers to have
allocations limited per instance, as they are not allocator-aware. This
commit adds a Qt-style camelCase() function to the STL-style
snake_case() with the semantics we want.

Task-number: QTBUG-128450
Change-Id: I2e4aa228c71c821c01bafc0f37956d29fe652ef1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6306ebe749e083126a39b9dd13d7060aa7bdacc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:34 +00:00
Thiago Macieira 6978951d5e Fix users of static max_size()
Container::max_size() is a _non-static_ member function in the STL, so
we can't call it as C::max_size(). Instead, use the newly-added,
Qt-style camel-case maxSize(), which we will keep static constexpr.

Task-number: QTBUG-128450
Change-Id: I839df90a91cced85f000c7d2744ba547f629ed98
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6c15f99853c4cecd9285e189a441392a397b0f82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:31 +00:00
Edward Welbourne 1d725c0094 Mention GMT-offset form of short-names for timezones
This fixes the documentation side of an issue with QTZ::displayName()
not doing what's documented. (The MS-eccentricities have been fixed by
earlier work.)

Fixes: QTBUG-84297
Change-Id: I3ec522aa81741fbf2d3dd247786310304e14f304
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b3a00a38af1226ebd6617638872d540f1ecd76df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:29 +00:00
Ivan Solovev f5a2d34da8 Add max_size() and maxSize() to view types
That requires including qcontainerfwd.h to the headers, so that
we could get access to QtPrivate::MaxAllocSize.

The max_size() methods are added for compatibility with stl.
The logic for most of the views is similar. The only exception is
QAnyStringView, because its character size may vary, depending on the
contained data.

The maxSize() methods are the static equivalents of max_size().
QASV does not have it for the reasons mentioned above.

[ChangeLog][QtCore] Added max_size() to all string-view types.

Amends 7ce6920aac.

Found in 6.8 API review.

Change-Id: I467c7d64ec3d92eb424eb5b94a39ec3d45d63d1f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2382bfb5b03f6f03a31981dc416121cf556b962a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:26 +00:00
Ahmad Samir 60ed64e1d6 QTimerEvent: port to Qt::TimerId
[ChangeLog][QtCore][QTimerEvent] Added constructor taking a Qt::TimerId.
Also added a getter for Qt::TimerId.

[ChangeLog][Potentially Source-Incompatible Changes] The protected
(and undocumented) QTimerEvent::id member variable has been renamed to
m_id to allow for the addition of an id() getter that returns a
Qt::TimerId.

Task-number: QTBUG-128144
Change-Id: Ia156f11e9e9347b6bf61b36e40da3ad551d23407
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 29b98eabf07b9e9d223039ec58b989acbaba844c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:23 +00:00
David Faure cd528d81f7 QWidgetWindow: fix enter/leave events not sent due to fractional scaling
If widget A starts at y=0 and widget B starts at y=19, when the mouse
moves from y=15 to y=18.6667, the code was doing childAt(p) with a
rounded QPoint y=19 and finding B, but then the relative coord for B
was set to -0.33333 so B wasn't under the mouse and didn't get an enter
event (and since it's now the "last receiver", it doesn't get one later
either when y is bigger).

Add QWidget::childAt(QPointF) to fix this.

Fixes: QTBUG-128391
Change-Id: I76d4b711a8297648780bdd079eb67405ab12be14
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 40bde8a572bd8ed039d3f5a5ab99b281de7410bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:20 +00:00
Christian Ehrlicher 5ebab802cc SQL/Interbase: Add and document Interbase_ROOT
Instead specifying Interbase_INCLUDE_DIR and Interbase_LIBRARY allow to
use Interbase_ROOT instead. Use this new option in the sql driver
documentation.
Additionally add 'fbclient_ms' as possible library name so we don't need
to distinguish between Interbase and Firebird anymore.

Change-Id: I472f95f82ebb93888002deccdf5028a1827a4745
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 89dd15e359228a57351bddc2429db4d57863bc8f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-31 08:56:17 +00:00
Mate Barany 6065ed9948 Pass QSslError::SslError by value
It is a small and trivially copyable type.

As a drive-by, make the operator a hidden friend.

Found by an Axivion scan.

[ChangeLog][Potentially Source-Incompatible Changes][QtNetwork] Made
the QSslError::SslError QDebug operator<< a hidden friend of QSslError.
This means the operator is no longer a match for arguments implicitly
converting to SslError, only for SslError itself. A backwards-compatible
fix is to make the conversion explicit: debug << QSslError::SslError(arg).

Task-number: QTBUG-125026
Change-Id: I9b6673397b6a26d508783304240c91fa058139bc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit f02402044e552f2940d4677039f3d02c41eb27ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-30 23:16:27 +00:00
Fabian Kosmale df6d88ea2c QHash: fix constness for heterogenous lookup functions
Change-Id: I161237fc243ebcf48e1318dae045f2e812796786
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 205edd15070720ce94ef5ba7d7e32b0b715abcf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-30 13:47:33 +00:00
Ivan Solovev 48c8eef930 serialization: remove incorrect noexcept on comparison operators [2/2]
This patch is about removing noexcept on functions that use
Q_ASSERT. The argument is that in these cases Q_ASSERTs act as
precondition checks, so we should probably follow the Lakos rule.

Although, technically the change is fine, because the current
implementation of Q_ASSERT is marked as noexcept(true), there are
some ideas of changing that in future, so we should not be setting
in stone something we can't change later.

Found in 6.8 API review.

Change-Id: I1d4aa228c713821c0ebbfc0f3b956d29fe652ed8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 5ac15093dcbaf92ac166961f5e8bfe9418cc15c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-30 13:47:33 +00:00
Lucie Gérard 820f00693c Correct license for module and plugin file
According to QUIP-18 [1], all module and
plugin files should be
LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
or
LicenseRef-Qt-Commercial OR GPL-3.0-only

Also, LGPL and non LGPL should not be mixed in a given directory

[1]: https://contribute.qt-project.org/quips/18

Task-number: QTBUG-121787
Change-Id: I3384e5a4e40547d61118064fa1052b3d87a4e42b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit bdee35195126d230f6229b5f22d4d4a7bb15d4d1)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-08-30 13:47:33 +00:00
Ivan Solovev 665aaf9f6a QDate: rework stdSysDaysToJulianDay()
Use !QT_CORE_REMOVED_SINCE(6, 7) to make the function a template
in new C++20 code. The removed_api.cpp will still compile the
exported version, keeping BC.

This simplifies the ifdef'ery around the functions and saves the
need for the QT6_{DECL,CALL}_NEW_OVERLOAD trick.

Picking this change down to 6.7, because the original patch was
also picked to 6.7.

Tested it on MSVC in C++20 mode, and verified that the symbol
is still there. Also tested the case from the linked bugreport,
and verified that it does not give linker errors.

Amends 88702cc87c
and effectively reverts 91f48cc4b77b1cfb5a4490c3bed3eb97edd2f85a.

Task-number: QTBUG-125610
Pick-to: 6.7
Change-Id: Idf49fd142cdc78ff8964a36f8c1e326357e1028e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d23764c5a12e0d6d26dd54ee5613f7e5b1f9c8af)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-08-30 09:19:08 +00:00
Christian Ehrlicher 7fb7972021 Widgets/fusion style: remove check for _q_isComboBoxPopupItem property
The fusion style was the only style which checked for an undocumented
property '_q_isComboBoxPopupItem' to determine if a CE_MenuItem should
ignore the drawing of a checkmark. Remove it to be in sync with all
other styles.

Task-number: QTBUG-127536
Change-Id: I6f0af2219a2da1d8d1920cb95c233fb3e32a21ab
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a3568a19eaba98697854db50af5546c09464ca73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-30 06:38:49 +00:00
Christian Ehrlicher cd34e5c7ba Widget/StylesheetStyle: don't draw checkmarks for combobox dropdown
The combobox dropdown items are drawn as CE_MenuItem elements. Those
elements may have a checkmarks but not when we draw them within a
QComboMenuDelegate. Therefore add the same check as for fusion style to
avoid drawing a checkmark in a QComboBox dropdown menu.

Fixes: QTBUG-127536
Change-Id: Ib22046b018fdf36eb26518899d2427d40b0110b8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c2d56961394cea799b0caa241c3517ed88aa6c66)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-30 06:38:48 +00:00
David Faure 2622b7f602 QListView/QTableView: attempt to move each row even after a failure
Change-Id: I039917c9fa82d356291e75abc7233b3b220a1931
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit bac5b6188fb18b0c41625d42809dd318abfc6c39)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 22:13:33 +00:00
Thiago Macieira eb2a072f91 CMake/macOS: don't conclude x86_64h is a cross-compilation on x86_64
Change-Id: I60f6907e58e98e54c000fffd840dcce413b569b6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 081394894bfecd1fb9df1da90b91fbee06150358)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 21:29:05 +00:00
Marc Mutz 88e7b7e99c [docs] Separate two paragraphs in max_size() docs
Formatting indicates that this was how it should be rendered, but qdoc
won't paragraph-break unless there's an empty line.

Add it.

Amends 7ce6920aac.

Change-Id: Idfd3cbc9f075b5f206c2042dc7b22508735dcb38
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 02b436f2c5d7368827794e7ec1224419dca39e7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:57 +00:00
Marc Mutz f8b3c1f0a7 QChronoTimer: remove static singleShot() functions
They match what QTimer already provides these days, and we want to
minimize porting for users come Qt 7, so we don't want users to first
write QChronoTimer::singleShot() (because it exists) and then back to
QTimer::singleShot(); we want them to continue to use QTimer.

The only reason QChronoTimer is a separate class from QTimer is that
the latter has an int interval property and we can't just port it to
milli- or nanoseconds chrono types if we want users to actually access
the extra range or precision afforded by the chrono types. But that's
not an issue for the singleShot() static methods, as they never return
an object that could be asked for its timeout.

(No ChangeLog needed, as QChronoTimer is new in 6.8)

Found in API-review.

Fixes: QTBUG-128426
Change-Id: Ief8b7c8d25380c0e9e9c5c36c90ce34c147557ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6e5eb082c934cb94c45f3e13b3f7c2deb2e7b2e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:50 +00:00
Marc Mutz 2fb422828e QTimer: make singleShot() have nanoseconds resolution [2/2]: new-style
Port the new-style singleShot() static methods from milliseconds to
nanoseconds resolution.

This matches what QChronoTimer provides, but we want to minimize
porting for users come Qt 7, so we don't want users to first have to
port to QChronoTimer::singleShot() and then back to
QTimer::singleShot(); we want them to continue to use QTimer.

The only reason QChronoTimer is a separate class from QTimer is that
the latter has an int interval property and we can't just port it to
milli- or nanoseconds chrono types if we want users to actually access
the extra range or precision afforded by the chrono types. But that's
not an issue for the singleShot() static methods, as they never return
an object that could be asked for its timeout.

The old-style static methods were already ported in the first step,
which also contain the ChangeLog common to both patches.

Task-number: QTBUG-128426
Change-Id: I1899465c3b852ab546983a0bf35853fdd3f91ef3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6991e848e3a0470e301d006a799b1351909884ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:43 +00:00
Marc Mutz 054270c717 QDirListing: make move SMFs noexcept and inline
This requires giving up unique_ptr for a raw d-pointer:
https://stackoverflow.com/questions/9417477/where-does-the-destructor-hide-in-this-code

That isn't much of an issue, because the class is move-only.

Also add a swap() member function.

Found in API review.

Change-Id: I2478bb5d05ff7bae0111ba97e788c88f7b4dded1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 71167b7982be4d7a9090aa6b0e0846d5e9bf303b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:38 +00:00
Marc Mutz e6ab7847a7 QTimer: make singleShot() have nanoseconds resolution [1/2]: old-style
Port the string-based singleShot() static methods from milliseconds to
nanoseconds resolution.

This matches what QChronoTimer provides, but we want to minimize
porting for users come Qt 7, so we don't want users to first have to
port to QChronoTimer::singleShot() and then back to
QTimer::singleShot(); we want them to continue to use QTimer.

The only reason QChronoTimer is a separate class from QTimer is that
the latter has an int interval property and we can't just port it to
milli- or nanoseconds chrono types if we want users to actually access
the extra range or precision afforded by the chrono types. But that's
not an issue for the singleShot() static methods, as they never return
an object that could be asked for its timeout.

The new-style static methods will be ported in a second step.

[ChangeLog][QtCore][QTimer] The singleShot() static methods now
operate with nanoseconds resolution, like QChronoTimer. The rest of
QTimer remains milliseconds; use QChronoTimer if you need a QTimer
with nanoseconds resolution of more than INT_MAX milliseconds
range. Beware overflow that may occur when passing large milliseconds
objects that may overflow nanoseconds::rep when converted.

Task-number: QTBUG-128426
Change-Id: I11e1ad8529c67b4018f6325ac408686799475823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4e911bda295b53bc74cf1af26008b3e60181668d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:37 +00:00
Ivan Solovev d4d2636e5e QDirListing: extend unit tests
Add the tests for the (move-)constructors and move-assignment.

Change-Id: I795a314a0e6d1795006fe152397eb6d9eeb3c712
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b6466275c27f9ec4ec8b09641e203f7afef3f7e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:36 +00:00
Ivan Solovev cb6a3fe53e QArgumentType: remove the incorrect noexcept from comparison operators
The QArgumentType::name() getter evaluates the name lazily, which also
involves constructing a QMetaType. It's not entirely clear if adding
noexcept there is a good idea, so drop it.

Amends 5a0faa9198.

Change-Id: I73042f22df9615f570823a7745f04e9731c097fe
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e39eb34bc6585c5ec367727e86f70ce67c2d176a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 20:41:33 +00:00
Edward Welbourne d12b85ae0b Document the potential widening effect of upper-casing
In QChar we don't return the upper-case from when it's not
representable as a single QChar; for strings, the uppercase string may
be longer than the original.

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I57bb1412d79d579a9cc4dc6bdbb839e56f9ea0a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 65eb1c5579ec56d15583b4af45b50fddd3c799a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 18:21:38 +00:00
Oliver Eftevaag 6a2c2488a1 Close popups on window deactivation and orientation changes in qGuiApp
With the introduction of QQuickPopupWindow in 6.8, much of our popup
management had to be moved from QApplication to QGuiApplication.
Most of this was done in e4ef0f03e6, but
closing popups on window deactivation and orientation changes, were
left in QApplication. This code path was used to close popups when the
user clicks outside of a window, on platforms suchs as wayland, were
QWindow::setMouseGrabEnabled(true) doesn't work properly.

As it turns out QApplication::notify() never calls
QGuiapplication::notify(), which is why I'm duplicating the code from
QApplication into QGuiApplication, instead of simply moving it.

Task-number: QTBUG-121363
Change-Id: I36bebd029a2f8e3ec0cdbab40971682cf948d438
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 914c2ef4fb926c16e8874c9c3691401f7e22ae22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 18:21:37 +00:00
Edward Welbourne 0b89eb6c6f Remove spurious and unused QUtcTZP::init() with too few arguments
QUtcTimeZonePrivate accommodates the custom time-zone API and, as
such, needs to know all of its details when constructed. The
constructor as a plain UTC-offset constructs the details to match a
custom zone, so that it also has those details initialized. As a
result, this backend never initialized a zone from only its IANA ID,
as all the others do, so does not need an init() with that signature
(which did not adequately initialize the instance anyway).

Change-Id: I462f537c9d48e09f05f91aae0ff6c7a317b421c1
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Magdalena Stojek <magdalena.stojek@qt.io>
(cherry picked from commit 70b680502997678b7c9964acef6569b18b6a65bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 18:21:35 +00:00
Łukasz Matysiak d563ec3fba Introduce QT_COMPILER_SUPPORTS_INT128 in qsystemdetection
c661dbd42d injected `QT_NO_INT128` into
every TU when compiling for VxWorks.
VxWorks uses a custom stdlib implementation that does not support 128bit ints
and at the same time they use an off the shelf Clang that defines
`__SIZEOF_INT128__` which is used to detect if 128b ints are available.
This resulted in Qt falsely assuming that 128b ints are available.

Detect if 128bit are available instead of injecting `QT_NO_INT128` and
define `QT_COMPILER_SUPPORTS_INT128`, use it instead of directly
checking `__SIZEOF_INT128__`.

Task-number: QTBUG-115777
Change-Id: I7531ebe780b4bdd78b42daf8dae0e522a316a88e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 5a10744bb4afc0c95b1b7bbba8848cf14b0bad00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 18:21:34 +00:00
Alexandru Croitor bbca3a8e02 CMake: Handle multi-value PURLs and CPEs in attribution files
Qt attribution json files might want to specify more than one PURL or
CPE for a given entry. Change the build system code to detect whether
a JSON PURL or CPE key contains an array of values, and if so, convert
it to a cmake list and use that for further SBOM handling.

As a result, the PURL_QT_VALUE, PURL_3RDPARTY_UPSTREAM_VALUE, and
PURL_MIRROR_VALUE getting an 'S' at the end, aka they are renamed to
PURL_QT_VALUES, PURL_3RDPARTY_UPSTREAM_VALUES, and PURL_MIRROR_VALUES.

Also the attribution key is now called just PURL instead of
UpstreamPURL.

The CPE json attribution key and option name stay the same.

Amends 47fd38be4bce0958fcfce8080d1580c4e3c2a15b
Amends 95b7fe49900904d19fca21876c84f97c2a6ae03d
Amends f7e1123620b623be0c321b54eaba7a1d618a7ce1

Task-number: QTBUG-122899
Change-Id: Ieec919901c3b44df80bc196536f68632a9761d92
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 797ce76ee946245898f9d11fa7e3ffb889e117d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 18:21:31 +00:00
Edward Welbourne e5c551a5cf QtXml: be systematic about feature dom
All the actual code of the module was subject to #ifndef QT_NO_DOM,
aside from the *_p.h that were only included subject to such #if-ery,
so there's nothing left of the module if the feature is ever disabled,
but be consistent with the module defining a feature that allows that.
Convert #ifndef QT_NO_DOM to #if QT_CONFIG(dom) (and move to outside
the namespace, where nothing was inside without the define), require
feature dom in the *_p.h and test, change CMake config to skip the
test when the feature is disabled (and add a missing SPDX comment),
condition including sources on the feature.

Pick-to: 6.7 6.5
Task-number: QTBUG-122619
Change-Id: Ie2167b6c56d96c7804785e225f3fe02dbc78984c
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a4c85a5cf19d8919797aba41077bfa8796427f54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 18:21:29 +00:00
Ivan Solovev 790a52b7e0 Register Qt::TimerId with the meta-object system
By using Q_ENUM_NS macro.

Amends 4bc0834bc1.

Found in 6.8 API review.

Task-number: QTBUG-128144
Change-Id: Icb3b4e76e0c36066d480b1f756c5a9c8aa5cb43f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6e2705bbc891d5ddd4924815a641830d2a0ccf4b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 17:57:27 +00:00
Julian Greilich b2706531e9 Android: Exclude the QtWindow itself from Accessibilty
Since the QtWindow and its QtEditText are focusable only to hand
over events to other components, the QtWindow itself should not be
focusable by TalkBack, since this leads to an unnecessary nameless A11y-Element
in the A11y tree.

Task-number: QTBUG-126672
Change-Id: I532b9d3e252fbe01da7c953446242b045c57eebe
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 46cb9027f1ed6c61faec5364b5537ae7ab9e57c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 17:24:19 +00:00
Ivan Solovev 571a4a3efb QDirListing: unexport the class
This is a non-polymorphic class, so we should export only individual
out-of-line methods.
Same for the nested DirEntry class.

Amends c39a0d1e89.

Found in 6.8 API review.

Change-Id: Ifde785d9ece1641351501159963d8cc065d8e140
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7394f7151404e0649eb59d8fa84eb7061635ee70)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 17:24:15 +00:00
Marc Mutz 6dfb013b62 DRY QT_FOR_EACH_STATIC_CORE_TEMPLATE()
Use the same technique used elsewhere in qmetatype.h to deal with
missing features: define a new macro to either contain the types
controlled by the feature or be empty, and then call that macro from
the larger-scale one.

DRYs the list of types to not repeat QByteArrayList and QStringList.

Amends cdbc76360a.

Change-Id: I767452aa33c1a2404315a0c3cd02f7102b9d6653
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fbc80ee163f16baafcc236b533ea7ccc3376fa2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 17:24:14 +00:00
David Faure a9e464119a QTableView: implement moving rows by drag-n-drop
This is only available when calling setDragDropOverwriteMode(false)
so this makes no difference in most applications (see implementation
of QAbstractItemView::position).

QTableWidget::dropEvent() was assuming we were dropping onto items
without checking that this was the case, this is fixed here,
and QTableView::dropEvent() is added to handle moving rows,
with very similar code to QListView::dropEvent().

Task-number: QTBUG-13873
Task-number: QTBUG-101475
Change-Id: I96e75da2c0abf6f568edba461735905dee5cb84f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 8e63cf282cb248ddd7fbc908766091659b3a0b22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 04:16:55 +00:00
Ahmad Samir 679ae93507 QDirListing: fix typo in header guard
Was missing an `R`.

Change-Id: Iefdb373c152c31baf3e6769a5e2814c0d9800e60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 61a3ca6f635c86b91fe3a2ac481e7de138447523)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 04:16:53 +00:00
Marc Mutz 514e244913 qFuzzy(Compare|IsNull)(): mark as noexcept
These all cannot fail, so can and should be noexcept. Most were
already.

Found in API-review.

[ChangeLog][QtCore/QtGui] All qFuzzyCompare() and qFuzzyIsNull()
overloads are now noexcept.

Change-Id: I67a2981ea4af9be0370becf84103822fd766ab5e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6a3a28236c6a0c34d37a614ca4e68ccd136d90e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 04:16:52 +00:00
Tor Arne Vestbø b86a0cb720 xcb: Sync XCB connection after reparenting window
This is important for the reparenting to take effect even if there
are no other state changes to the window, such as changing its
geometry.

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I9b39b56d163faf7a9b472cefbb19efdb944cb304
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 92619ce2ec8381aa01647337665e626b84063f59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 04:16:51 +00:00
David Faure d5109e4a88 Implement QTableModel::moveRows
Implemented the virtual method moveRows to allow row movement.
Used it for the case of sorted insertion.

Heavily based on QListModel::moveRows and its unittest.

[ChangeLog][QtWidgets][QTableWidget] Implemented moveRows in model.
When sorting is enabled, setItem() now moves the row to its
sorted position, emitting rowsMoved rather than layoutChanged.

Task-number: QTBUG-69807
Change-Id: I62a150cca4e5b7d982f2359a6d8c248494528cac
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit f951c11586081efea108ea5b6a7028c672e12c2a)
2024-08-29 04:16:49 +00:00
Christian Ehrlicher 517d11d0c5 SQL/PostgreSQL: use PostgreSQL_ROOT in documentation
Instead specifying CMAKE_INCLUDE_PATH/CMAKE_LIBRARY_PATH use
PostgreSQL_ROOT which is suits much better for the usecase.

Change-Id: Iac239d88d4c9c11d5482acacb2bbb1bb034c4365
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit a664a6e225abdd4a62aac57df10e3507fcd2b561)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 04:16:48 +00:00
Alexey Edelev 8e0d08d0c6 Add the missing dependency between _copy_fw_sync_headers and _sync_headers
The dependency is specified for the Ninja generator, but is missing for
others, which leads to the invalid order when building with Unix Makefiles
generator for MacOS platform.

Amends 103eca1070

Pick-to: 6.7 6.5
Fixes: QTBUG-127987
Change-Id: I78927ee3fa7b0926f03b0e5eab67983c4d0d3e67
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 2d87bb7d2eb9827899546cca3e59e8174ce04b8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-29 04:16:46 +00:00