67735 Commits

Author SHA1 Message Date
Marc Mutz
e5890084dc QThread: mark is(Main|Current)Thread() noexcept
The rationale given for the addition of these functions was that they
are a more efficient way to check these things in public API.

If so, they shouldn't cause compilers to insert exception handling
around their calls, so mark them noexcept.

This is safe, as both conceptually and practically, these functions
should not and cannot fail, so we'll never need to remove noexcept
again.

Found in API-Review.

Amends 7a374c38d288435b3c0a76b82a1c2ca53ea9c003 and
a3d50112e44bc42b310d9d3a8e6c7805ef31ef53.

These two commits also lacked each the changelog entry, so adding them
here:

[ChangeLog][QtCore][QThread] Added isMainThread() static member
function.

[ChangeLog][QtCore][QThread] Added isCurrentThread() member function.

Change-Id: Iaf39ce2cc0abd45049bff60b24693e84bf76d9e0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d73a2bf0fb3e0a00691c858645a5a5bb2b55b40a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 15:53:35 +00:00
Bartlomiej Moskal
7b65e0395f Android: Fix keyboard inputType and imeOptions
There was a small mistake in:
d2ae5ef51e3339c11b1c0ed0b09f9d17b9708f53 commit, which caused a
regression in the input method.

While the function parameter name has been changed, the assignment name
has not. This resulted in the values never actually getting updated.

Fixes: QTBUG-125410
Pick-to: 6.7
Change-Id: I8e64e991d02546ddd078fd273f0b57491c63b55c
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 79e00b0b25765b85b112b601fee70184b1efe3c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 15:53:34 +00:00
Marc Mutz
d908c6162c qfuturewatcher_p.h: fix missing qfuturewatcher.h include
Extending headersclean_check to private headers has shown that
Q_DECLARE_PUBLIC needs to know the Public class in-size, so a
forward-declaration is not enough. Says Clang:

  qfuturewatcher_p.h:31:5: error: static_cast from 'QObject *' to 'QFutureWatcherBase *', which are not related by inheritance, is not allowed
      Q_DECLARE_PUBLIC(QFutureWatcherBase)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Amends the start of the public history.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I1e132aaa844f5c87d57446e8818280fd141d2b1e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b58d926090620079f602f4f2ce9f17fe7025c962)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 15:53:34 +00:00
Volker Hilsheimer
aaeb4970fd JNI: port QTimeZone on Android to QJniArray
Replace code that manually operates on jarray with QJniArray.

The comment about using separate jobject and QJniObject didn't make
sense; we didn't construct the QJniObject via fromLocalRef(), so
allocated a new local reference anyway, in addition to the local
reference returned by GetObjectArrayElement.

The implicit code now creates a QJniObject (-like object;
QtJniTypes::String contains a QJniObject) as well, but it's also
just a temporary. It would be cheaper to iterate over a
QJniArray<jstring>, but only if we then duplicate the code from
QJniObject::toString to not create an intermediate QJniObject.

Change-Id: I9f10541f533dd2fbd2f7ba6fdacc7d79b3ac3ae9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 64127a7a0db657cbc844938f02b623f90cdd78ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 15:53:34 +00:00
Joerg Bornemann
3e320e45bf CMake: Build dbus tools when building dbus tests
This adds the build dependencies
tst_qdbuscpp2xml -> qdbuscpp2xml
tst_qdbusxml2cpp -> qdbusxml2cpp

Fixes: QTBUG-126115
Change-Id: I8a52568023743924fac67ce88ea446189b0328c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 0f71a00357234b3cbd30b3d010ae8b10c5a25fec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 12:23:45 +00:00
Marc Mutz
9eb670d8d7 tst_QStringBuilder: add more checks
- for const char[] with embedded NULs
  - incl consistency between QString and QByteArray targets
    (inconsistent, filed as QTBUG-117321)

- with QByteArrayView as LHS

Task-number: QTBUG-117321
Pick-to: 6.7 6.5 6.2
Change-Id: Ieef9a4cf917f737da53112f89a1d95c97ebade06
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 57a65735f25774d39214e2199916e9801ac69dd6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 12:23:43 +00:00
Marc Mutz
23013db675 QStringEn/Decoder: port (name, Flags) ctors to QAnyStringView
This reverts commit f8359084b948fd8f6027d23a869f1a0d50cc30c1.

Lookup-by-string functions should be all taking QAnyStringView, not be
overloaded on QString/const char*.

Found in API-review.

[ChangeLog][QtCore][QStringEncoder/QStringDecoder] The (name, flags)
constructor now takes QAnyStringView (was: const char*).

Fixes: QTBUG-126108
Change-Id: If68343ce5ec2ff60ce55156f9f2dc2bb6938e07f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d4c4e6b876b948c1a34abdd46cf7f5be1c302137)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 12:23:41 +00:00
Marc Mutz
0026955270 QStringConverter: port (name, Flags) ctor to QAnyStringView
These kinds of lookup functions are no-brainers for QAnyStringView.

This is required to replace the QStringEncoder/Decoder constructors
from QString, newly added for 6.8, and found in API review to be
better written using QAnyStringView.

Because this is API-Review-relevant, keep the implementation
pessimized. It's not worse than the code that it replaces (toLatin1()
on an unshared QString performs in-place conversion), and can be
improved later.

Task-number: QTBUG-126108
Change-Id: I4a0d1840d4754670b2e2f20d768ed98f7e1937d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f6c11ac4f20a16d0b2113014e2dac63b95d946ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 12:23:40 +00:00
Marc Mutz
09c3e9da1f QStringConverter: port encodingForName() to QAnyStringView
These kinds of lookup functions are no-brainers for QAnyStringView.

This is required to replace the QStringEncoder/Decoder constructors
from QString, newly added for 6.8, and found in API review to be
better written using QAnyStringView.

Because this is API-Review-relevant, keep the QStringView case
pessimized. It's not worse than the code that it replaces (toLatin1()
on an unshared QString performs in-place conversion), and can be
improved later.

[ChangeLog][QtCore][QStringConverter] The encodingForName() function
now takes QAnyStringView (was: const char*).

Task-number: QTBUG-126108
Change-Id: I02cc53bfbc8f1eebe539816487a10b39e96fac2d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b3edce58e5aea76d1d84c868f76171c2b40520a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-12 12:23:38 +00:00
Giuseppe D'Angelo
70dcbb4f17 QESDP: deprecate QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST
We've had this workaround since Qt 5.4. It's due time we get
rid of it. This commit deprecates it, in preparation for removal.

[ChangeLog][QtCore][QExplicitlySharedDataPointer] Support for
QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST has been
deprecated, and will get removed in a future version of Qt.

Change-Id: I3000ea606b37714542916e105ebd50871dc42935
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0ed039fd134fb8025236847295681f13f1775847)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 23:18:44 +00:00
Volker Hilsheimer
a53473052b Widget gallery example: set color scheme before constructing UI
On macOS, we see unexplained white flashes of the UI when
overriding the scheme in the widget's constructor. This only
happens when running the bundle, but not when running the
executable.

Work around that problem by setting the scheme immediately
after constructing QApplication.

Task-number: QTBUG-126248
Change-Id: I4a5fe467d628fca5e52e1e36f43af8143239c7fa
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 88322f69a20fddedd9c45a1bb25f6c1d2dcf31f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 19:35:30 +00:00
Volker Hilsheimer
ea8277dbf3 macOS: use QStyleHint to get color scheme in the style
That way, an override through QStyleHints::setColorScheme is
immediately respected by the style.

As a drive-by, make the helper static and inline.

Change-Id: Ia6cde1f5099d9194b25fac812c3184f5a61bf1dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 4245987f6875d01853053c50d13ecf42b61fc0ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 19:35:30 +00:00
Volker Hilsheimer
450cd772e2 JNI: use QJniArray in ContentFileEngine
Replace manual array creation and conversion code.

Change-Id: Icd728b69790c0ed7a6ab38ff4f07622bea2be000
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 254d5ca38dff0b580777b5067816a6bb2669704d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 19:35:30 +00:00
Volker Hilsheimer
3d9527a102 JNI: port QNetworkProxyFactory to QtJniTypes
Simplify the relevant QJniObject calls to not use callObjectMethod,
but rely on the return type that we have to pass in anyway. Replace
manual loop unwrapping with QtJniArray, and declare the QtNetwork
Java class so that we can use it directly.

This removes the last usage of Q_DECLARE_JNI_TYPE in qtbase.

Change-Id: If872684c8b52bc7789e248cfc3046817c411903c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 909493bae27eeb55c985aa9522a57bc4e60d0893)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 19:35:30 +00:00
Jan Arve Sæther
77dd4bb142 Move AA_QtQuickUseDefaultSizePolicy out of Tech Preview
Change-Id: Ibdd23455c266af6748aca9de859ea21caac50634
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 8b0f56e99838f974a675ce557b8a5646519fd780)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 19:35:30 +00:00
Alexandru Croitor
e83de10922 CMake: Fix forwarding the '0' argument which is by default falsey
If the forward argument was meant to be 0, it was not forwarded
because it evaluated to false in if(condition).

To pass it along, instead check for empty strings.

Change-Id: Ia366df147de0c2d333017da43dc0643b56a89e9c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 96abceb64e5dc0570ca7c3419f401cfafe946ba0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 19:35:30 +00:00
Shawn Rutledge
b1481a1663 Fix MouseButtonDblClick synthesis from touch double-tap
When QGuiApplicationPrivate::processTouchEvent() sees that the
touch event was not handled, and calls processMouseEvent(), the latter
uses the QEventPoint with pointId 0 regardless of the original
touchpoint ID. Now it updates the persistent QEventPoint from the
original touchpoint so that a double-click event will not be ruled out
because of the timestamp delta or position delta (movement since press)
being too large.

Fixes: QTBUG-125993
Pick-to: 6.7 6.5
Change-Id: I8e9b007818107ac2329454e0ccfb2ac9e506b617
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2a0b907f11b9c0ad46322ba06482861423246d93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 16:36:38 +00:00
Tor Arne Vestbø
c410163173 Report 2.x scale factor for UIView on visionOS
The docs claim that this is the default, but in practice it's not
the case.

Change-Id: I5f6184cbfded2efedbac88023644d3c1e80e9901
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit a05f5457ca033214c1efcf528b85a09a9c758920)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 16:05:32 +00:00
Tor Arne Vestbø
ad8b330ecc iOS: Merge UIView initializers
We always create UIView via initWithQIOSWindow, so there is no
need to keep part of the implementation in initWithFrame.

Change-Id: I5311ed78fff3294ed49af70d482449cbf3b8211b
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 29b6674d3f8d1012def9dbcf89521e4773175dc1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 16:05:26 +00:00
Tor Arne Vestbø
6ce8738dd3 iOS: Remove debug code that is no longer needed
Change-Id: I95c29cb1dd237a95c291a8c8874473022e14c65a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bb5750cd6952e3c6afc5a49406dd22a40929291f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 16:05:19 +00:00
Łukasz Matysiak
03ada21195 Use /tmp to test eq operator of qdir
The test checks if two paths test equal if they are pointing to the same
place, but one of them is not a canonical path.
Example of such paths: /tmp/.. and /

The test assumes that /usr is an existing directory on platforms other
than win, haiku and android.
The reason /usr is used instead of /tmp is that /tmp is a symlink on
macos and that interferes with the test (as described in 0b67ad9d).
However /usr does not exist on VxWorks (unless created by the user).

/tmp can (and is in our CI env) enabled by turning on the
INCLUDE_TMP_DIR component.

Solve the problem by using /tmp instead of /usr on vxworks.

Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I98b0d46d1b879f404c0b5bd655031e7c3f19ba33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 70e2fe2bba71ea0a4d1d1e533c1130c97f77df55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 13:13:45 +00:00
Edward Welbourne
addbb45e54 Add missing feature checks in removed API
The #if-ery on the removed API's definition still needs to match its
declaration. Spotted by Axivion.

Pick-to: 6.7
Task-number: QTBUG-122619
Change-Id: I4e3dc03291a8fb7fbc01065bce8e5dc58a051166
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 76f82b8f1334d8a377630876ef2d9681c05d7ee8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 08:38:07 +00:00
Mårten Nordheim
555cbb3976 QDnsTlsAssociationRecord: make move ctor default-noexcept
From the API review.

Change-Id: I74140a9268670575488ddc3c31b09c84bc83eae0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit df85c6fd9d65abf44ccdcd1d6e6594cab3fc7d65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 07:41:11 +00:00
Mårten Nordheim
1b3bef3ef4 QDnsTlsAssociationRecord: Use the PURE_SWAP macro for move-assign
Found in API-review.

Change-Id: I77aecfdf31a2a3507798faa03f24f3ea26bf8173
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7e7b7eb37e780d5c43ba291d4f88d29f4b31d403)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 07:41:05 +00:00
Giuseppe D'Angelo
da9da78adc QGraphicsView: add a failing test
Task-number: QTBUG-53974
Pick-to: 6.7 6.5
Change-Id: Ibff3e32080a2978e533bd1f3215fec81bedb72b7
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit f27534158e64ed1fb3aacc090995ea4b2d4b26fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-11 00:32:25 +00:00
David Faure
72c97d17bc Fix SSE2-related false positives with thread sanitizer
TSAN has the same issue as ASAN when it comes to the SSE2 usage here.

WARNING: ThreadSanitizer: heap-use-after-free (pid=621)
  Read of size 8 at 0x721000049f78 by main thread:
    #0 _mm_load_si128(long long __vector(2) const*) /usr/lib64/gcc/x86_64-suse-linux/13/include/emmintrin.h:700 (libQt6Core.so.6+0x2ba056)
    #1 qustrlen_sse2 qtbase/src/corelib/text/qstring.cpp:431 (libQt6Core.so.6+0x2ba056)
    [...]
  Previous write of size 8 at 0x721000049f78 by main thread:
    #0 realloc <null> (libtsan.so.2+0x5bdbd)
    #1 QArrayData::reallocateUnaligned(QArrayData*, void*, long long, long long, QArrayData::AllocationOption) qtbase/src/corelib/tools/qarraydata.cpp:244 (libQt6Core.so.6+0x309913)
    [...]
(gcc 13.3.0)

Pick-to: 6.7
Change-Id: Id0127d5fb498dcf78bb977e6ff1b6b380ae423c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 600368279dafa60e788d8e3cd3af5c1915990fbb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 23:27:28 +00:00
Joerg Bornemann
1ffe93ae5d CMake: Emit the 'msvc_obj_debug_info' feature only when MSVC is used
In non-MSVC configurations this feature is meaningless.
Restrict it to MSVC.

Change-Id: Ib5111e8adf49a862d8ca0f191837d8c28aab6890
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 433411934c7ebb2a29e950c14871199166e5534a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 22:25:32 +00:00
Marc Mutz
c54f772618 QHttpMultiPartPrivate: de-inline dtors of polymorphic classes
Prevents weak (= duplicated) vtables and the associated problems.

Amends the start of the public history.

Pick-to: 6.7 6.5
Task-number: QTBUG-45582
Change-Id: I26618483900437aca05c753a5d53a359e43bd702
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 645509935ad5a2e8a3fcc858c41d08919a2596bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 22:19:28 +00:00
Friedemann Kleint
4206ef4a93 SQL/IBase: Fix some translatable messages
Amends 4b0b41ec3b362715012f8c771b72c4704f8170f3.

Change-Id: If51e22fb9b19755a0d8f222f8c0044563f8c55f8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 806e02060a8a84509506884d2620010f3b43cdd0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 22:19:28 +00:00
Marc Mutz
8c4c66f07f qhttpmultipart_p.h: add missing qiodevice.h include
QIODevice is a base class of one of the classes defined in this
header. QtCreator's clangd goes on a rampage in this header as a
consequence.

Amends the start of the public history.

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I06c6a26dde7e7ae72b722136fcd666684733d40f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 09fce4a587047ff03c7ca37dbb2bb8f71a18a75e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 22:19:28 +00:00
Volker Hilsheimer
194fa0dc02 Fix build error from signed/unsigned mismatch
When building for 32bit Android:

qcolorclut_p.h:45:31: error: comparison of integers of different signs:
'qsizetype' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
        Q_ASSERT(table.size() == gridPointsX * gridPointsY * gridPointsZ * gridPointsW);
                 ~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix by casting the result of the multiplication explicitly to qsizetype.

Change-Id: Ica9a2f9738959adfa841270ffdd4893bd7d1d4e8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 37ba5e94d681c8d65b0e44a14b0e1595d072800e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 19:57:37 +00:00
Mate Barany
6c2b076650 Make the new post and put methods inline in QNetworkAccessManager
Found in API review.

Change-Id: I873c8c0b7e9521d07718b7fd38065d33b98e3ba9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f0a8fe6cdf3ec5e8c9030fa581df1aad3b78d210)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 19:56:21 +00:00
Alexey Edelev
a2af3e11e1 Make the access to QT_USE_TARGET_ANDROID_BUILD_DIR explicit
CMake somehow doesn't treat the access to the cache variable in
condition as the usage. Replace the check of the
CACHE{QT_USE_TARGET_ANDROID_BUILD_DIR} value with the check of the
CACHE variable definition and the check of the CACHE and non-CACHE
value equality.

Pick-to: 6.7
Change-Id: I07d940d457ebbc4ce3cefef2f73394009d52f367
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 69a661e88e6a7799799033030497086a9194caab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 19:29:16 +00:00
Topi Reinio
f15e6d60e1 Doc: Qt Network: Fix linking issues
src/network/kernel/qdnslookup.cpp:1300: (qdoc) warning:
        Can't link to 'certificateUsage()'
src/network/kernel/qdnslookup.cpp:1388: (qdoc) warning:
        Can't link to 'matchingType()'
src/network/socket/qlocalserver.cpp:273: (qdoc) warning:
        Can't link to 'pendingConnectionAvailable()'

Change-Id: I8ba7e674de6aa548990099e24327f15168fde88e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6ef3ca87818f9beb9668e45b65ee8a23efd6e809)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 19:29:14 +00:00
Olli Vuolteenaho
894c1d4a35 Fix path in Java QML component generation
The parameter buildPath comes from QDir:absolutePath(), which gives a
path that starts with '/' or a drive speficiation. When calling
getImportPaths on a Windows machine the path becomes something like
"/C://dev/qt5/...". As a result, androiddeployqt exists with a failure.

On Linux/macOS systems this was not a problem because // = /

Change-Id: I85376253055549344f06c9da9ebd67364e429112
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 776982a14e53e8661c3508c3d05e0efe538bc67e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 07:11:02 +00:00
Jan Moeller
52bb40a088 Android: Remove check for screen/window ascpect ratio mismatch
The check was re-introduced in 7a9bc220c70745cd3689d51cd131efde86f078d7
and moved to QtRootLayout in 6ff88f97a6d24d1098583421161f8f903f9dafde.
It introduces an issue where the resizing of the application window does
not work if the its aspect ratio is different from the screen's aspect
ratio.

Fixes: QTBUG-126122
Pick-to: 6.7 6.7.2
Change-Id: Id6d26b247b9ca7a8d0e89e1fdea2d77db12a6cfe
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit a6b78e6f4dbbf688fc0b1d1487b86890b149d323)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 04:54:23 +00:00
Giuseppe D'Angelo
3b1d343215 PCRE: upgrade to 10.44
New upstream release.

[ChangeLog][Third-Party Code] PCRE2 was updated to version 10.44.

Change-Id: I49ecc9f25c104813f87203b8a75338e81a1bd813
Pick-to: 6.7 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 33387ed25f3fa5d914040ebe889b63b7c3daf853)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 02:06:02 +00:00
Ahmad Samir
c9b985eae3 QTimer: fix API docs related to QChronoTimer
QChronoTimer is in Qt 6.8.

Found in API review.

Change-Id: I7f20958948cb635ccd1f4cef383aed810a188f12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 25f2b7c32226fdabcb22fbf928bb0c058cd53022)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-10 02:06:01 +00:00
Ahmad Samir
741c1d0f11 QFileSystemModel: fix leak in unittest detected by ASAN
Amends e524724f9dc6f64f6f94b842682c751dcd07225f.

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f73b50fc1d8 in operator new(unsigned long) (/lib64/libasan.so.8+0xfc1d8) (BuildId: 1827a4c72065a9f25ba519b25166029eebbf519f)
    #1 0x7f73b4cc18d4 in std::__detail::_MakeUniq<QSignalSpyPrivate>::__single_object std::make_unique<QSignalSpyPrivate, QSignalSpy*>(QSignalSpy*&&) /usr/include/c++/13/bits/unique_ptr.h:1070
    #2 0x7f73b4cbf0a4 in QSignalSpy::QSignalSpy(QSignalSpy::ObjectSignal) src/testlib/qsignalspy.cpp:259
    #3 0x55c0e313cd7d in QSignalSpy::QSignalSpy<void (QAbstractItemModel::*)(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal)>(QtPrivate::FunctionPointer<void (QAbstractItemModel::*)(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal)>::Object const*, void (QAbstractItemModel::*)(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal)) (build/tests/auto/gui/itemmodels/qfilesystemmodel/tst_qfilesystemmodel+0x83d7d) (BuildId: b2e416794e25fdb925a191cc4a5efe3cb04efb0e)
    #4 0x55c0e30eccac in tst_QFileSystemModel::prepareTestModelRoot(QFileSystemModel*, QString const&, QSignalSpy**, QSignalSpy**) tests/auto/gui/itemmodels/qfilesystemmodel/tst_qfilesystemmodel.cpp:392
    #5 0x55c0e30edacf in tst_QFileSystemModel::rowCount() tests/auto/gui/itemmodels/qfilesystemmodel/tst_qfilesystemmodel.cpp:420

Pick-to: 6.7 6.5 6.2
Change-Id: Ia085f9235f3bec252290f4fbe5ea0958f91a5e5a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5686af295c98a5ed4b0793ad0098cef76f39a2d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-09 14:25:14 +00:00
Ahmad Samir
b1301fffe9 QFileSystemModel: replace a TODO with QT{6,7}Only
So that it's not forgotten come Qt7.

Amends 19258608e9ea02043ce9b53d4a9c99700ce49c1b.

Change-Id: I323f2d2738a295faa1e118c3ea7c8a5b6c6d0ac7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ef8e1e5861292514a676c5fed4d670fb6ecb887d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-09 14:25:08 +00:00
Tor Arne Vestbø
9bd3752029 iOS: Compute window level when needed instead of up front in member var
When a popup widget is shown, it's first raised(), and then made visible.
In this scenario, the logic in QIOSWindow::setVisible() to compute the
window level was too late, and we ended up showing the popup below other
popups.

Instead of moving the window level computation earlier, we remove the
member variable and just compute the level when needed, as we do in
the Cocoa platform plugin.

Fixes: QTBUG-126052
Fixes: QTBUG-126044
Pick-to: 6.7
Change-Id: If5dbcdcf0500aed57b725bb8eb636fe076459130
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 0e656164e640ff2aca00e82b51b0f1019fd7802f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-09 11:55:16 +00:00
Tor Arne Vestbø
0ad536d65c permissions: Add note about specifying custom Info.plists
Pick-to: 6.7
Change-Id: I468e93c12b5ae2c51a2690c6f171c3aac76c2c31
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 306847d4a3ebfded9480b35954adc90a1cbc98a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-09 11:55:13 +00:00
Tim Blechmann
c08c615107 QIcc: fix clang's -Wimplicit-fallthrough
Clang's -Wimplicit-fallthrough is a little stricter than gcc's.

Change-Id: Idf933e19ab2d664885743e5db6c1fbb66c8b615e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 05a139d5fb5eb3d652f24ef5ebe28c232b69c6a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 08:52:49 +00:00
Volker Hilsheimer
e4c386b0b7 QJniArray: add deduction guide for direct construction from container
That way,

QList list{1, 2, 3};
QJniArray array(list);

works.

Change-Id: If04f8115c51fce533cb4287bf36841ff0daeb11b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f199d4f78d528f7a70170d2469ae4807e4a5e765)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 08:52:49 +00:00
Volker Hilsheimer
4ef415825c JNI: clean up SFINAE constraints in QJniArray
Rename the predictate for checking whether a container type has the
required member functions and types to IfContiguousContainer (we
need size(), data(), and value_type members).
And since std::initializer_list always meets that criteria, remove the
constraint from the respective constructor.

Add an IfConvertible predicate to test whether the element type of
an existing array can be converted to the element type of the new
array.

Change-Id: I7e5ba31de9664088b027c277c068c948f2189238
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 468126d34a8c3a2fdd486768f935d13ebe565dd0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 08:52:49 +00:00
Christian Ehrlicher
a2b442fef8 SQL/IBase: code cleanup part 5/5
Make some untranslated texts translatable.

Change-Id: I636cdcaff749d6770d82095e4a2381097f83ed2c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4b0b41ec3b362715012f8c771b72c4704f8170f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 06:25:15 +00:00
Christian Ehrlicher
2e98bc7ffa SQL/IBase: code cleanup part 4/5
Make sure that QByteArray does not detach when not needed and avoid some
copies by using QByteArray::fromRawData().

Change-Id: I4454a3113c6bd1fe30b404af091f5cc0f904f78a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 54853352bbeff7ad3ee3b3aa3a90e45de5082e17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 06:25:09 +00:00
Christian Ehrlicher
12b2e08747 SQL/IBase: code cleanup part 3/5
Pass 'const char *' when the string doesn't get modified.

Change-Id: I8b2e06b027362debcd81282dc3123235a7e643a3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e623f038f7738c202e745f693458ccb81f9484b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 06:25:01 +00:00
Christian Ehrlicher
fbbd62d90c SQL/IBase: code cleanup part 2/5
The lower bit of the sqltype is used to express NULL values and needs
therefore masked out. Do this before the acutal operations for better
readability/debugability.

Change-Id: I71ee97f4c38241ccc9804562e2826ce9b53567ba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fc4750bd753999e9a0787614ac8960e0506075dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 06:24:53 +00:00
Christian Ehrlicher
1c423e57d3 SQL/IBase: code cleanup part 1/5
Cleanup the code by replacing repeated access to sqlda->sqlvar[] with a
temporary (const) ref to enhance readability and avoid repeated lookups.

Change-Id: I716812f4446bac7fb3e92bc6fbb099845836624f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andreas Bacher <andi.bacher@outlook.com>
(cherry picked from commit 2a7e28923c5aae99690fc5a32460b3dbb376c4c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-06-08 06:24:44 +00:00