62516 Commits

Author SHA1 Message Date
Ivan Solovev
d8f614648f QDBusServiceWatcher: fix binding loops
This class has two bindable properties - watchedServices and watchMode.
What makes this class non-trivial is the fact that these properties
depend on each other - setWatchedServices() need an up-to-date
watchMode to set up the services, and setWatchMode() needs an
up-to-date list of services in order to update the mode on them.

Update the setters in such way that they remove the bindings from
the updated property, and at the same time trigger the re-evaluation
of the property they depend on.
This includes refactoring of the helper setConnection() method in such
way that it does not cause property re-evaluation, and also update
of the {add,remove}Service() helper functions to take the watchMode as
an input parameter.

The public {add,remove}WatchedService() methods were updated similarly.
The logic of the removeWatchedService() method was additionally
updated to do some changes to the properties only if the
service-to-be-removed actually existed in the list.

Task-number: QTBUG-116346
Change-Id: If46cf926c7ace9dc4893d8daaef088f61e41c21a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit d85663ced8762b3096dbcbcfbc3894895a6e11c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-03 18:53:37 +00:00
Ivan Solovev
1a779b15b2 QPauseAnimation: extend tests and fix binding loop
Extend the unit-tests for bindable properties and fix the discovered
binding loop by using {set}ValueBypassingBindings() in the setter of
the duration property.

The code refactoring does not modify the setter logic, because
previously the binding was anyway implicitly removed when calling the
assignment operator. The updated code just does it explicitly.

Task-number: QTBUG-116346
Change-Id: I0f339d182efb60500ee7f12e407f200d739da312
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit b64e36240b807e6dba783732593036439fec8a62)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-03 18:53:30 +00:00
Ivan Solovev
2bc116f832 QSequentialAnimationGroup: extend bindable property unit tests
The bindable property tests should use the helper functions from
QTestPrivate.

Task-number: QTBUG-116346
Change-Id: Ie1a61ab80e6f737eac02246214c2c93129a1cf94
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 22c2c15b27a65e988be2c7e21f3e97c4ced97375)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-03 18:53:29 +00:00
Ivan Solovev
bda8582f39 QStandardItemModel: extend the test coverage for property bindings
The pre-existing tests were not using the QTestPrivate helpers, so
extend them with the call to QTestPrivate::testReadWritePropertyBasics.

The updated test didn't reveal any problems with binding loops, so no
other action is required for now.

Task-number: QTBUG-116346
Change-Id: I360614a40fe2bacb796051607ed67e7e666b4f22
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit ac59fcdab8adb80648fee15956428630946dd01d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-03 18:53:21 +00:00
Ivan Solovev
fd7418cfb5 QPropertyAnimation: fix binding loops
... by using valueBypassingBindings() when accessing the properties
from the setters.

Task-number: QTBUG-116346
Change-Id: I04abc394f4406dc0fa75c55a9093e10c27a20c30
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit b6b94111c77df60c425617d0d76a6574906294c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-03 18:53:13 +00:00
Alexey Edelev
84dbb356ef syncqt: Close ifstream before attempt to remove file
ifstream may block the file descriptor in some operating systems.
Wrap the reading of files in staging directory with extra scope,
to make sure that ifstream closed the descriptor before the removal
attempt. Also make sure that we closed the ifstream explicitly.

Change-Id: I56ef5e9925501912d5cd61e8545f664e0a0d90b8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3115610cfa37b1341392039537299aea4a0b5d93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-02 10:53:12 +00:00
Thiago Macieira
9e1eb7ff69 tst_QFileInfo::stdfilesystem: add extra Unicode string tests
Change-Id: I2b24e1d3cad44897906efffd17803f70bd4d60f6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 5b9e2f31bd4bc636cf596ef3375317f33041cad5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 22:40:56 +00:00
André Klitzing
6c6653719e Fix living QLibProxyWrapper after shutdown of QCoreApplication
Task-number: QTBUG-84234
Change-Id: I8f5e2947b6529a0a8871d040050205934ee60354
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit cda98280edd2ab7b8d6b3dee08281b045c470dc5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 22:40:55 +00:00
Thiago Macieira
7bee8bd163 QList/Doc: document the resize() overload taking a parameter_type
Added by commit b42a2b3c3338a320a438bc081cb885fd4547f01f for 6.0, but we
forgot to document it.

Change-Id: I2b24e1d3cad44897906efffd1780086b51c0e3fa
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit a15fef35ff9f78a2c16c31cc106175453d5ecfe0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 22:40:53 +00:00
Thiago Macieira
66dfbea290 tst_QFileInfo: replace a portion of a macro with a lambda
It's very hard to debug a macro.

Change-Id: I2b24e1d3cad44897906efffd17803b8eac9bd844
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 9e8c93fac10b802448b6b7938054220984734434)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 22:40:48 +00:00
Thiago Macieira
641459e986 tst_QFileInfo: don't trigger libstdc++ std::filesystem bug
libstdc++'s std::filesystem::path implementation incorrectly assumes
that any 8-bit char input is UTF-8, when it patently isn't on Windows.

Reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111244

Fixes: QTBUG-116609
Change-Id: I2b24e1d3cad44897906efffd17803f2862935c9b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 2b06d41b46cf97a92dee10c4432cdc5c719bcee0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 22:40:47 +00:00
Volker Hilsheimer
f326d50e72 QAccessible: consistently respect rootIndex of item views
Accessibility implementations rely on correct information about the
model dimensions when operating on item views. An item view that has a
root index set needs to report it's size based on the root index, rather
than for the view's model directly.

Pass the rootIndex to all calls to QAbstractItemModel::column/rowCount.
Refactor the code to avoid excessive dereferencing of a QPointer, apply
const and fix/improve coding style in touched lines.

Emit a ModelReset notification when the root index changes, or (in the
case of QListView) when the model column changes.

Split long Q_ASSERTs into multiple lines to be able to better trace the
exact reason for an assertion, and replace the assert with an early
return of nil when it's plausible that a cached cell is no longer part
of the view (i.e. because the root index changed).

Add a test case that verifies that changing the root index changes the
dimension of the view as reported through the accessibility interface.

Fixes: QTBUG-114423
Change-Id: I7897b79b2e1d10c789cc866b7f5c5dabdabe6770
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit c59b34b8cf1c2a087e361d4235990803d89d34ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 19:08:23 +00:00
Ahmad Samir
2a70f6cccf QMdiArea: port Q_FOREACH to ranged-for, loop could call QCA::sendEvent()
Take a copy of the d->childWindows container because each loop body
may end up directly/indirectly calling QCoreApplication::sendEvent()
which means unbounded/unknown code could be invoked causing recursing
into the class, leading to modifying the childWindows container while
iterating over it.

Task-number: QTBUG-115803
Change-Id: Ib62ba38700e8862940ba98fdeb663dd730ff125f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 875f988af5d9df6c85269959414014d6ef1417ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 12:36:51 +00:00
Assam Boudjelthia
5a171799cf Image Gestures Example: use QFileInfo for images file names
The example keeps around image file names only and append
them to the selected dir path, that works fine for file
scheme files, but for Android with content scheme files,
that doesn't work as good because usually the paths are
returned by a provider and managing them manually like
appending a file name to a directory (tree) path might not
work.

This patch retrieves QFileInfo objects and use the absolute
file paths to open any image.

Fixes: QTBUG-116181
Change-Id: I9911a181d92ba0452500398cbe052b9583bd79a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 381612f7944b202c8b1428f0cc9d1af72f5f7647)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 06:31:46 +00:00
Volker Hilsheimer
fbafac20af Constrain QCoreApplication::requestPermission to compatible functors
The 6.5 versions of the overload not taking a context/receiver object
were constrained by requiring a functor to be free function or lambda.
207aae5560aa2865ec55ddb9ecbb50048060c0c0 removed that constraint, which
might be source incomaptible if wrapper functions in user code forward
the constraint using Expression SFINAE. Those wrappers would no longer
be removed from the overload set based on the same criteria as the
function they wrap.

We can't constrain the new functions based on the same predicate as
before, as after the simplification we have only one overload with, and
one without context object. But we can still remove overloads for
incompatible functors.

Add the respective scenario to the QPermission test as a compile-time
test.

Found during 6.6 header review.

Change-Id: Id21391b4a6b78a29de2f8fa04374f4262e5fafa7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d027b0c8162ac888de233cf3a41e3254ba2d7cc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-01 04:33:39 +00:00
André Klitzing
50d9ed401b Fix -no-feature-sharedmemory
Fixes: QTBUG-114779
Change-Id: I7acf9bc2ba461fe1644c4ff6a157f88c9cce84c4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 514a6776e1055015ace1ef6378834a6c4d776864)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 14:39:34 +00:00
Elias Hautala
e76a01d690 Exclude some examples from Android build
Excludes  dnslookup, waitconditions, semaphores, cbordump, savegame,
convert, pingpong and complexpingpong examples from Android build
because of missing Qui and Quick dependenies.

Task-number: QTBUG-111933
Change-Id: Ied01f62ee61a9220dcb44c13fda46f6a5e158293
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 39a5ed4bdd348d3cd18a08d322b48d85e8d116e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 14:39:34 +00:00
Morten Sørvig
fa4231bd11 wasm: rename JsString -> EcmaString
QString::fromJsString -> QString::fromEcmaString()
QString::toJsString() -> QString::toEcmaString()

For API naming compatibility with QByteArray::fromEcmaUin8Array()

Change-Id: If6e2121e31e630d6728ed24e41d14b763f395aaa
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit c802a9e987c9e38c01580f467eab92a651b3e033)
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-08-31 16:39:34 +02:00
Ahmad Samir
928885a5c0 QMdiArea: port Q_FOREACH to ranged-for: loop doesn't change container
The container is childWindows in all cases:
- place(): queries the windows' geometries
- setChildActivationEnabled(): sets a bool member in subwindow->d
- subWindowList(): {pre,ap}pends windows pointers to a separate QList

Task-number: QTBUG-115803
Change-Id: I0fdd5f22f29f085b71bf46f68bf9ec04c45c9317
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 79dc2980e69d1b568c3c80e30a3bd0af21548f22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 11:52:30 +00:00
Ahmad Samir
c013c57c84 QMdiArea: port Q_FOREACH to ranged-for, d->pendingPlacements
Task-number: QTBUG-115803
Change-Id: Ibf2f049aacad925fea318c0ec490749e68e05b1d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 446af298b0c00a419ff8e373e6b2917fd2af44eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 11:52:01 +00:00
Ahmad Samir
e016960338 QMdiArea: port Q_FOREACH to ranged-for, d->pendingRearrangements
Take a copy of the member container as the loop may modify the container
(either by moving/reordering the Rearranger elements or by appending).

Task-number: QTBUG-115803
Change-Id: Iaf891b29e9c7cdfdb3dc82e03ed94defb8d0cf4c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit cfec14e1ff94b05bdfe15294199964247dbac518)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 11:51:55 +00:00
Casimir Saastamoinen
6782e1eb70 Enable binfmts incase it is disabled
Task-number: COIN-1075
Change-Id: I476833e87af213b4fd7eced4accdc19f093c6824
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit d4cccd0471cd5b57c900ef13e5dedd30f79f9de7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 10:34:27 +00:00
Thiago Macieira
514d24da02 tst_selftests: deduplicate the Unix/Linux conditions
Amends 118f2210c6279803b9a4103a796ce75e88f8beb2. That commit added

 #ifdef Q_OS_UNIX
     if (test == "assert"
         || test == "crashes"
         || test == "failfetchtype"
         || test == "faildatatype")
     return; // Outputs "Received signal 6 (SIGABRT)"
 #endif

Which duplicated 4 out of the 5 tests in the block:

 #ifdef Q_OS_LINUX
    // QEMU outputs to stderr about uncaught signals
    if (QTestPrivate::isRunningArmOnX86() &&
        (test == "assert"
         || test == "crashes"
         || test == "faildatatype"
         || test == "failfetchtype"
         || test == "silent"
        ))
        return;
 #endif

But as Linux is Unix, we never got to that second block for those 4
tests.

Change-Id: I2b24e1d3cad44897906efffd177fb4b5507d190a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit f1ba2b9f44964a0546da4815669cf728e50dd4a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 08:06:51 +00:00
Thiago Macieira
63959e4560 QArrayData: change calculateBlockSize() to not have an in/out parameter
Won't make a difference in codegen, but it's the right thing to do.

Change-Id: Ifa1111900d6945ea8e05fffd177dc8d200c2368f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 167d28e77adbaeb482cfb3c27c5acd41777430cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 08:06:51 +00:00
Michael Weghorn
3fc198cf3c a11y uia: Don't return "S_OK" and null text range
When QWindowsUiaTextProvider::RangeFromPoint was
called with a point that is not over any
character, it was previously returning S_OK
and a nullptr for the text range.

This is contrary to what the
ITextProvider::RangeFromPoint documentation [1]
says:

> If this method succeeds, it returns S_OK.
> Otherwise, it returns an HRESULT error code.

and

> The property never returns NULL.

Therefore, setting pRetVal to NULL and returning
S_OK at the same time is problematic.
Return UIA_E_ELEMENTNOTAVAILABLE instead for that
case, and only return S_OK when actually
setting a valid text range provider as well.

Ideally, this should return an empty range for
the character that is closest to the given point.
That one could be identified by iterating over all
characters and calculating their distance to the
given point, but that would be too expensive.

[1] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextprovider-rangefrompoint

Fixes: QTBUG-115801
Change-Id: Ib08d02677935a45517c937613785f1e3f53ee032
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 9900a12df649229c9ff9e2115ac90fb7f634da1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 08:06:51 +00:00
Timur Pocheptsov
001ecc5d7b OpenSSL: move DH calls under OPENSSL_NO_DEPRECATED_3_0 guard
Initially, DH functions were deprecated, but when OpenSSL v3 was released,
they changed their mind (now they changed it again). OpenSSL must
be configured with 'no-deprecated'.

Fixes: QTBUG-83733
Change-Id: I69f14929e91f5fc147f9297f6fff20674e81b6f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 8051edfdb5efcafd76b178990b8ff760342aeee3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 08:06:51 +00:00
André Klitzing
01692d46c8 Bump androidx dependency to 1.10.1
This avoids linter warning:
  Obsolete Gradle Dependency

Change-Id: I9d2e3f7a4d082c7b90e5e533b9fe3d5046b79a48
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 5dc9692e48ea15ab3da4283997547a2849f1944e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 05:38:28 +00:00
Olivier De Cannière
6099a3e09b QLocale: Add Q_ENUM registration for some enums
Fixes: QTBUG-116527
Change-Id: If04bd5f504b3a8a39a35b9ba7024cdc9eb2d154a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit f9dccd05d3ff4bb403b8ad66f641695c9a00ee1d)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-08-30 15:50:32 +02:00
Thiago Macieira
7efe78bb5e QTimer: fix regression on singleShot-invoking non-mormalized SLOT()s
The was introduced with the rewrite of QMetaObject::invokeMethod() in
commit 0f76e55bc440a70f5d9530a192c9ce6334a8f06, because we have an
optimization for zero timers to avoid creating a temporary
QSingleShotTimer object. The old implementation did attempt to normalize
the target slot name, but did so because it looked metamethods up using
QMetaObject::indexOfMethod:

    int idx = meta->indexOfMethod(sig.constData());
    if (idx < 0) {
        QByteArray norm =
QMetaObject::normalizedSignature(sig.constData());
        idx = meta->indexOfMethod(norm.constData());
    }

The new implementation does not use this method so it didn't need to
attempt to normalize.

I am fixing this only in QTimer and not in QMetaObject::invokeMethodImpl
(even though it is trivial to do so) because I don't believe spaces in a
pure string to invokeMethod were ever expected to work:

    QMetaObject::invokeMethod(obj, "slotName ", Qt::QueuedConnection);

The Q_ARG and Q_RETURN_ARG (for code not recompiled) still does
normalization inside QMetaType::fromName().

Fixes: QTBUG-116060
Change-Id: I964c2b1e6b834feb9710fffd177cac60c83ef413
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4368179c37cae05d16109e319fc1c77490754c7d)
2023-08-30 09:17:18 +00:00
Timur Pocheptsov
0cc4424414 tst_QSslSocket: don't use deprecated RSA api
OpenSSL 3.1.2 can be configured with no-deprecated option, in this
case test fails to build.

Change-Id: Icaf457f55fb001b632922856dbe4bbb5bdba220e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a323f05c5e3b4b2268b3a00eac79af1bdfaa03bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 18:15:18 +00:00
Thiago Macieira
d5e8ff75ce tst_QUdpSocket: move up the search for IPv6-capable interfaces
Let's do it in initTestCase(), where we're already searching for IPv6
addresses, instead of storing the information in a local static.

Change-Id: Ifa1111900d6945ea8e05fffd177efb6a055aaa58
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit fd924ab0b648f6a7516a6940272115a7db736a25)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 16:57:13 +00:00
Alexey Edelev
10cc2d614c Allow generating deprecated header files cross-module
If some header files were moved to another module within same repo it
makes sense to allow deprecating them. 'syncqt' now is able to detect
this kind of header files if the 'foreign' module is specified in
qt_deprecates pragma as part of the deprecated header name.

Task-number: QTBUG-116483
Change-Id: I479ea60e71de112b67c281722600cd818aac7762
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7e84a04563142d217317928865a8f6475d189d95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 16:57:11 +00:00
Thiago Macieira
25d7fa178b QString: use qustrlen() in the QChar* constructor
Instead of a manual loop, which was there since at least Qt 4.5.1
(beginning of the public history).

Change-Id: Ifa1111900d6945ea8e05fffd177dd3dfea450a67
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 9c70e117114b51d3c72283d976048e2768968039)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 16:57:06 +00:00
Thiago Macieira
d0968b6ddf Doc: update QTimer::start() to say that it sets the interval
I thought it went without saying...

Fixes: QTBUG-116218
Change-Id: I964c2b1e6b834feb9710fffd177c8338f8f1e618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 2c86903704413d869131d5ea81951eb8de51639e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 16:57:04 +00:00
Thiago Macieira
3590e2cc52 tst_QNetworkInterface: enable IPv6 detection for Windows
This was disabled in d0d1d7403377363a101d4f1781d06a9b44787d0a, I guess
accidentally, by a too-wide conditional. The change the same commit
applied to QtNetworkSettings didn't make the same mistake.

I am also opportunistically updating the conditional to QT_CONFIG (I
missed this in 9d4579c1cd0aae5f75c8702826b5d874a6aae83e) and adding the
Linux-specific check, as the AF_NETLINK implementation does not rely on
getifaddrs() or if_nametoindex().

Drive-by fix indentation.

Change-Id: Ifa1111900d6945ea8e05fffd177ef8fcb11b4e1e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 2e51fbf89a748ad3550e786f1bdbf623169550d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 16:57:02 +00:00
Thiago Macieira
724f7fb6c8 QVariant: de-duplicate customConstructShared()
Commit 3ad9f94ff2de3a1f812bb0139ff31e31d5ffb529 (Feb 2023) moved it to
qvariant_p.h but commit 79ae79d05c65019233cf9ae9e77ef59d90e75ac2
(authored Sep 2022 but committed June 2023) brought it back, probably by
accident due to conflict resolution during rebasing.

For some reason, no compiler in our CI complains about it, but ICX 2023
(based on unrelased Clang versions) did:

variant_p.h(101,23): error: call to 'customConstructShared' is ambiguous

Fixes: QTBUG-116496
Change-Id: Ifa1111900d6945ea8e05fffd177eab656a2dc507
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit bed203a6fccb77e008dc384615b0ffaae6e14b54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 16:56:59 +00:00
Timothée Keller
bd4ab9c23c Revert "Windows QPA: Change monitor index detection"
This reverts commit f4d6d04898bcc239f4b271330ba778de69bbd893.

Reason for revert: EDID serial numbers can be shared across monitors, so the move to EDID serial number for screen index detection does not work as intended,and breaks monitor detection.

Fixes: QTBUG-116499
Change-Id: I6995b21788eb632e38eeef3a93492dbe0740da4a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 695948fad028f97521135ecb3478f2798ae6700f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 13:27:19 +00:00
Assam Boudjelthia
d05102e1da Android: fix handling of tree content uri with sub-document
Check for the index of last '/' from the non-encoded path.

Amends ea75e34d6968bb59624874411e793c95b26d0dbe.

Change-Id: I3ef5d454a46c711a85fe7ef01ea9d3d93a2d574f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 4721721f6005c90cb1760b0c6e074468aa73512f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 13:22:09 +00:00
Simo Fält
208a587b01 COIN: Increase timeout for running sbuild for debian packages
Pick-to: dev
Change-Id: Id0b53dece8d4bbf1faa89c1ec409c5d241129779
Reviewed-by: Toni Saario <toni.saario@qt.io>
2023-08-29 11:15:07 +03:00
Ivan Solovev
1018624561 Update gradle to 8.3.0
The latest version of gradle was released on August 17, 2023

This update ignores most of the changes to gradle.properties file,
as we do not really use most of the variables which are set by the
upstream release.

Task-number: QTBUG-116236
Change-Id: If66e1a264328b772e742473b859ed9240f77b9c6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 39b39f0d5fd971515443f7517c850cc3ad698ef2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-29 04:53:11 +00:00
Christian Ehrlicher
3ba8179d6b QTextFormat: documentation fix
The QTextFormat description refers to setDirection() but this function
does not exist. The correct function name is setLayoutDirection() even
in Qt4.

Change-Id: I2d1f49fba558874b5875d8d93ef61d6208134609
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit fd96e11bb1200902ff7ec2bbe6f3903b2d96bdd8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 22:46:09 +00:00
Ahmad Samir
fc08f7c6b8 Gui: fix CMake warning about unconditionally installed headers
qaccessible.h and qplatformaccessibility.h are supposed to always be
installed as public headers, regardless of QT_FEATURE_accessibility.
Their contents are wrapped in "#if QT_CONFIG(accessibility)", so
installing them even if QT_FEATURE_accessibility is not enabled
shouldn't be an issue.

The warning was about uncoditionally installed header files,
"CONDITION_INDEPENDENT_SOURCES", being in a
"qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility"
call. Thanks to Alexandru for confirming my vague suspicions about the
issue in the bug report.

This amends commit 9f36ab1f8df7f79ffb78259725110106aa5a8e37.

Task-number: QTBUG-111785
Change-Id: I5e5950f341d6729e15961d6fb3d3f8fe85007e38
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit be0e81d493db8a4117a00de21adc39ce02f0ee42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 22:46:09 +00:00
Andreas Eliasson
d8a8cc1295 Doc: Remove links to removed examples
These examples have been removed as part of the examples revamp project.

Change-Id: I2a8237334a2acae2735c2dbd86004048d288896a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 41f032e358e704693834a98d37331d0d63b7aab9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 18:55:25 +00:00
Christian Ehrlicher
35dda81f7a SQLite: Update SQLite to v3.43.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.43.0

Fixes: QTBUG-116248
Change-Id: I039f572d21a8506faa5e29a48cdc7e40f990d946
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 49e52e8dd68cc58b9c9ec9bd2c1f89184845d746)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 18:27:59 +00:00
Kai Köhne
b02a296710 Doc: Mention version of QApplication::setActiveWindow() deprecation
Change-Id: I7cd9be3b34a4cb7f396d175ff8137b590c2435c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit be26eb14da255514270773f9b90e9154c7a4c1c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 11:55:13 +00:00
Kai Köhne
646912cac7 Fix definition of QOSV::MacOSSonoma
Make sure that MacOSSonoma symbol is defined in
qoperatingsystemversion.cpp, instead of duplicating the
MacOSVentura symbol. This seems strictly speaking not
needed (as this shouldn't have compiled otherwise), but is
avoiding confusion in the future.

Also document when it got added (Qt 6.5).

Amends 0237709e2.

Change-Id: Idff7cbe0b5862907d735fb60f91f85469cb1edf0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5d8e0ce0fbe179b9f4e4ec46c209c746b57cbdf2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 11:54:54 +00:00
Safiyyah Moosa
bbae65a75d Doc: Add \examplecategory to qtgui
Task-number: QTBUG-116068
Change-Id: Ia0bdc2122434adac51b37ba2207a2b0b993cf19b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 3b187f14a1f80ac6893b5f7b5df9194691bc955c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 11:49:50 +00:00
Lorn Potter
883a12d28d wasm: remove 'shift' from being inputed on touchscreens
Fixes: QTBUG-116231
Change-Id: Icbbe80877c2c21c3e82ba2c27909b6679b72e498
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 91d3c48d3da5f75e126bbce79096a84c078e23e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-26 05:04:55 +00:00
Piotr Wierciński
8240f9437e wasm: Fix QFileDialog file filter
File filter was not properly processed when using LocalFileAPI.
The QtFormat->AcceptList conversion was happening twice, resulting
in erronous types. This prevented dialog from appearing on Chrome.
Additionally remove unused debug code.

Fixes: QTBUG-115087
Change-Id: Ie6770e2f1d2aa7c3ad19f9ab105dbec8102d45fc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 62caae95784a2e70d46194622e96e0e6bdf13c28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-25 18:53:35 +00:00
Timur Pocheptsov
e32b3aeb64 Blacklist tst_QMainWindow::QTBUG52175_tabifiedDockWidgetActivated
We are BLACKLISTing on macos/arm - the test is flaky.

Task-number: QTBUG-115945
Change-Id: I3be28c895d46ce5ba86e00d597016334bdb16021
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a3cbbe449a1946d1f50930859efe5f003cf6fda6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-25 18:53:35 +00:00