Commit Graph

50693 Commits (5b697bb08c8e16dcaac428f17b4d95efd7862d07)

Author SHA1 Message Date
Thiago Macieira 5b697bb08c QTest::CrashHandler: allow debugging crashed tests on Linux+YAMA
The YAMA LSM by default[1] prevents attaching the debugger to any
process that isn't a child. Since our backtracer comes from a child
process instead (i.e., tracing the parent), we must grant explicit
permission. This also makes QTEST_PAUSE_ON_CRASH=1 work.

[1] https://codebrowser.dev/linux/linux/security/yama/yama_lsm.c.html#ptrace_scope

Change-Id: Ic19d84a7a730c7f8fc0ffffd64e516447e4b1f35
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 731b1159f9da9d0a5f9871ceaef4b82b657b130c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 18:15:44 +00:00
Tor Arne Vestbø 1612734790 iOS: Remove safe area workaround for iOS < 11
We no longer support these iOS versions.

Change-Id: Ifcb2d0201ccc5017a088a05e491bcd0f4bfaa0e2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 9fbfe72649c6637256766472ac8025dafe4fb778)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 17:23:52 +00:00
Allan Sandfeld Jensen 6fd43cbb09 Fix runtime detection of ARM AES extension on Darwin (iOS)
Is enabled unconditionally for all desktop processors already.

Change-Id: Iaf8508fabcf90b6e76692d07250679a1a6103dca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cda53f290fbe57403a9db473aed61ad13193a4ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 17:23:50 +00:00
Laszlo Agocs 84cd298084 rhi: d3d: Gracefully handle EnumOutputs failures
Fixes: QTBUG-129147
Pick-to: 6.7 6.5
Change-Id: Idec2678135ae4622537bece35c4253d933655b10
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit d36dde37401fa5d56c4451059e8b8ec2bc06419d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 16:56:36 +00:00
Thiago Macieira ea5bff8feb qsimd_x86: disable the requirement that CPUs must have RNGs
Intel CPUs have had this since 2013 (Ivy Bridge), but some older
Bulldozer AMD CPUs appear to be missing it. This creates a mismatch
between when the __haswell__ macro gets declared in qsimd_p.h and the
runtime check using the CpuArchHaswell value. That in turn creates a
condition where qInitDrawhelperFunctions() in qdrawhelper.cpp leaves the
memfill pointers set to null.

#elif defined(__SSE2__)
#  ifndef __haswell__
    qt_memfill32 = qt_memfill32_sse2;
    qt_memfill64 = qt_memfill64_sse2;
#  endif
...
#if defined(QT_COMPILER_SUPPORTS_AVX2)
    if (qCpuHasFeature(ArchHaswell)) {
        qt_memfill32 = qt_memfill32_avx2;
        qt_memfill64 = qt_memfill64_avx2;

It does this so the qt_memfillXX_sse2 functions don't have to be defined
anywhere, so the QtGui build won't carry unnecessary dead code.

This is old code (from Qt 4.x) and several improvements I've made for
QtCore are not applied yet. My work for qSimdDispatcher[1] isn't
complete: it might have avoided this problem here, but it would also
have required major work for the draw helpers to work in the first
place.

[1] https://codereview.qt-project.org/c/qt/qtbase/+/537384

Pick-to: 6.7 6.5 6.2
Fixes: QTBUG-129193
Change-Id: Ia427a9e502b0fb46b2bdfffda8e2131b7091c9e9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 54c24313fe1e4ed58b3260189cb623a7c852ab1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 14:43:21 +00:00
Thiago Macieira e266c49c27 qtestcase.cpp: remove unused macros and includes
Amends c0014becca, which moved the code
that had depended on this.

Change-Id: I602661af164e6da118e1fffd0f9428c98b9ac2fb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit e15543a10a7d302aab05323a325630f1a9633192)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 14:43:04 +00:00
Thiago Macieira ffa9be4004 QTest::CrashHandler: add missing #includes
Amends c0014becca.

 <string.h> for sigabbrev_np()
 <qnamespace.h> for Qt::Initialization

Change-Id: I95097256825904997ad0fffd0e5f6c5907f8b383
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 22764dd71515e75748455b2aaf1a26052fddf9a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 14:42:56 +00:00
Thiago Macieira 202acb9dc7 QCommonStyle: work around apparent MSVC bug in using QFlag
With the upcoming change to QFlags to support 64-bit, MSVC started to
complain that it can't convert from Qt::Alignment to QFlag and back to
Qt::Alignment. It is correct that this path has an explicit and
shouldn't be taken, but
 a) it's worked for years
 b) GCC and Clang insert an extra conversion to int (I guess)

In any case, header->iconAlignment is already a Qt::Alignment so we
don't need to go through QFlag here.

qcommonstyle.cpp(1666): error C2440: '<function-style-cast>': cannot convert from 'const Qt::Alignment' to 'QFlag'
qcommonstyle.cpp(1666): note: Constructor for class 'QFlag' is declared 'explicit'

Change-Id: If349995b779be9e3dab4fffd8701af8615ae407b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit dc1f4b742edf469a61eb6067a5a0ca44aac6cd48)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 20:30:07 +00:00
Timur Pocheptsov 24be12c267 SecureTransport: use memory-only PKCS12 import on macOS >= 15
Our workaround with a temporary keychain is not working anymore.
Startring from macOS 15 Security framework supports a new option:
kSecImportToMemoryOnly. Setting it to kCFBooleanTrue allows us to
import PCKS12 without accessing 'login' keychain and thus avoiding
blocking system-alerts requesting keychain access.

Fixes: QTBUG-128579
Change-Id: Ic86460b05dbee07194b146cefc45df6a478946b1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 15817e7d29a5c496585ea0e45a8a8139f053f001)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 19:51:44 +00:00
Konsta Alajärvi a3af3505ef Android: Fix Android keyboard hiding focused QtEditText
Update QtEditText Layout parameters to match the item sending
the focus event while showing Android keyboard.

Task-number: QTBUG-125323
Change-Id: Ie7f32d66807e4c1d308d49483d1e72dc25eaa76a
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 28df9a49776a88cb1a8e69348ae19a59b16a5b7e)
2024-09-24 12:44:22 +00:00
Thiago Macieira 83d933ef07 moc: move the static_cast<ObjectType *> to the top of qt_static_metacall
We need it for the most common operations in this function
(InvokeMetaMethod and all the property operations), so this avoids
duplication and ensures we always compile the static_cast.

Change-Id: I21b199bb5a1a1de632a3fffd45b339c2f3326100
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 69ce741c186c9a1dd4ea9eecb7a51725c4e62342)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 04:16:19 +00:00
Thiago Macieira 30c490da13 moc: change the mangling of class names to closer to the IA-64 ABI
Commit e816f91541 ("Moc: avoid double
underscores in a generated identifier") added the CLASS..SCOPE..ENDCLASS
mangling to avoid creating double underscores, which are reserved to the
compiler and thus undefined behavior for us to use.

This commit changes that mangling to something similar to the IA-64 C++
ABI because a) that creates shorter identifier names that are often
easier to read if you have to open the moc result and b) will not
collide with a class name by the user that used SCOPE in the name, such
as:

 namespace Outer { class Inner { Q_GADGET }; }
 class OuterSCOPEInner : public QObject { Q_OBJECT } };

Before:
 Q_CONSTINIT static const uint qt_meta_data_CLASSOuterSCOPEInnerENDCLASS[] = {
 Q_CONSTINIT static const uint qt_meta_data_CLASSOuterSCOPEInnerENDCLASS[] = {

Now:
 Q_CONSTINIT static const uint qt_meta_data_ZN5Outer5InnerE[] =
 Q_CONSTINIT static const uint qt_meta_data_ZN15OuterSCOPEInnerE[] =

While I make no promises that this matches the mangling scheme, it can
actually be decoded by the c++filt(1) tool. The main difference (AFAICT)
is that we use the N..E production even for types in the global
namespace (e.g., "QObject" mangling should be "7QObject" but is
"N7QObjectE").

 $ c++filt _ZN42QTBUG32933_relatedObjectsDontIncludeItself2NS3ObjE
 QTBUG32933_relatedObjectsDontIncludeItself::NS::Obj

Pick-to: 6.7 6.5
Change-Id: I40b756c1ac0f6a986d79fffd14b2e245ac195afb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b020bff6e9a2e45760bab61bdb84efc078c45f7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 04:16:05 +00:00
Thiago Macieira ee65704341 moc: rename qt_meta_stringdata_%s_t to qt_meta_tag_%s_t
It's an empty struct now, a.k.a. a "tag struct". It used to be the type
of the actual data prior to QtMocHelpers::stringData().

Change-Id: I490a0b19e05103c74305fffd20c71a51e94fc449
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d9b4309f0ec8719b2575bfd8b911d1b950a4d7ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 04:16:04 +00:00
Thiago Macieira 973aeb422a moc: improve control of Q_UNUSED / (void) in qt_static_metacall()
Because I'm pedantic.

Change-Id: I3ac643db1a74864f0d69fffdebe7df6c6f1b1c28
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit e001ae19c700ac694a0ff1fea365e07e6e64f907)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 04:16:04 +00:00
Thiago Macieira 855bfed477 moc: indent the if () statements in qt_{static_,}metacall correctly
By removing the attempt to write if () {} else if () chains. The _c
variable is a primitive (an enum) local to this function, so its value
cannot change. All compilers in 2024 are smart enough to realize that

    if (_c == QMetaObject::CreateInstance) {
...
    } else if (_c == QMetaObject::ReadProperty) {
...
    } else if (_c == QMetaObject::WriteProperty) {
...
    } else if (_c == QMetaObject::ResetProperty) {
    } else if (_c == QMetaObject::BindableProperty) {
...
    }

is the same as

    if (_c == QMetaObject::CreateInstance) {
...
    }
    if (_c == QMetaObject::ReadProperty) {
...
    }
    if (_c == QMetaObject::WriteProperty) {
...
    }
    if (_c == QMetaObject::BindableProperty) {
...
    }

Drive-by not emitting some of the unnecessary property controls (which
all compilers would discard anyway).

Change-Id: Ib3e88392d7b960fbf64dfffd83ce636260ff6d7d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 245a1ecb8badaae4979e3fbaa25e8936a85a7428)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 04:16:03 +00:00
Edward Welbourne d802d268de Remove spurious #include from QJulianCalendar's implementation
The data tables are used to implement the locale-support methods,
which Julian inherits from Roman, so it doesn't need to access those
tables directly for itself - and doing so (potentially) duplicated
their static data in two compilation units.

Pick-to: 6.5 6.2
Task-number: QTBUG-128930
Change-Id: I313c14441c947daeb702aa17d85b4b6d4b5d3636
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 58ddd0ac31c1a9861463a77e31865e6249dfe2c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 21:15:56 +00:00
Edward Welbourne c7c64e7d0a QDateTimeParser: drop an invalid and largely pointless "optimization"
Now that the maximum and minimum might not be in local time, the day
might not be the same as the local time day. In any case, the "saving"
of checking for being past the end of that day is negligible compared
to all the other wanton costs of the date-time parser.

This is a follow-up to commit b6a11a4ee5319366f14c11c7cf3a4f1dbf33cfd5;
thanks to Tor Arne for reporting the resulting assertion failures.

Pick-to: 6.7 6.5
Change-Id: I1ba443df9340fa63b8765c25004b51467ca5244d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 070ab9e85208c467d2f59f7fdfc7afe627dc37e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 21:15:54 +00:00
Jonas Kvinge 8688948a20 Generator: Fix shadowing using declaration
Generated moc files contain `using` which shadows the previous `_t`
in the `qt_static_metacall` function.

To fix this rename the `using _t`.

Example.:

In file included from /home/jonas/Projects/strawberry/build-qt6dev/src/mpris2_player.cpp:217:
/home/jonas/Projects/strawberry/build-qt6dev/src/moc_mpris2_player.cpp: In static member function ‘static void Mpris2Player::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
/home/jonas/Projects/strawberry/build-qt6dev/src/moc_mpris2_player.cpp:266:19: warning: declaration of ‘using _t = void (class Mpris2Player::*)(qlonglong)’ shadows a previous local [-Wshadow]
  266 |             using _t = void (Mpris2Player::*)(qlonglong );
      |                   ^~
/home/jonas/Projects/strawberry/build-qt6dev/src/moc_mpris2_player.cpp:247:11: note: shadowed declaration is here
  247 |     auto *_t = static_cast<Mpris2Player *>(_o);
      |           ^~

Change-Id: I4a7d4e09ea599f3db97e21ae48599423f45885f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1a746e35ec5bef7f9ecf4d0fb7d8812523888d0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 20:04:47 +00:00
Tor Arne Vestbø e336111a5d tests: Explicitly check for pathconf(_PC_CASE_SENSITIVE) == 1
We use pathconf in some of our tests to determine if the file system
on Darwin is case sensitive. But pathconf returns -1 if the case
sensitivity can't be determined, with errno set to ENOTSUP.

The convention in this case is to treat the file system as not being
case sensitive (as reported by NSURLVolumeSupportsCaseSensitiveNamesKey
and VOL_CAP_FMT_CASE_SENSITIVE in equivalent APIs), so we need to check
explicitly for a return value of 1.

Change-Id: I1107e849babd8813da3b148c92494e8e35a32d36
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit bd3aabf38454087a96a17ff0130d7f5c2b2b39a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 19:36:53 +00:00
Kai Köhne df74e52578 Doc: Fix documented compress-algorithm attribute in .qrc files
The command line option is compress-algo, but in XML, it's
compression-algorithm.

Fixes: QTBUG-126953
Change-Id: I5ac631a5f5984d1a80781e8c1a42719686dbf27d
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 766d395f77146d9b08ef8a50d15d21b1e279a9b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 16:57:34 +00:00
Wladimir Leuschner 63a4def507 QWindows11Style: Draw ItemView text, in case of custom Widget
Fixes: QTBUG-128517
Pick-to: 6.7
Change-Id: Ia48935eb8bc0acd77178a76502a4e84eb9822a76
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit ceebef9af9f99ad1c497f56d5a4d376ce03006e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 13:57:04 +00:00
Alexey Edelev 4034c896de Add QT_BUILD_DIR to the cmake configure option list
The variable is required to calculate the inner CMake prefixes when
building the Qt CMake tests inside Qt CMake tests. Otherwise the prefix
path remain empty and CMake attempts looking for Qt by the system
paths.

This fixes Qt CMake tests when running them as part of non-prefixed
build tree.

Pick-to: 6.7
Change-Id: I8908ab0b47fe37044ccb2a950d8973790e4fd174
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f80c0f1f944ab5af6efef71306692cb1e916930c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-21 11:50:43 +00:00
Marc Mutz 44f5e46650 QCocoaEventDispatcher: add missing override keywords
Amends 17763a7b31, but not picking back
further than f8da484d57, to avoid
provoking "inconsistent override" warnings.

Change-Id: I463e391f4acb896641e5d3d120a52143b1a9a8a9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d4348cc9b4cadca3585872ee8632a47c6ec85101)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-21 10:24:20 +00:00
Marc Mutz 185a1e09f1 QtPrivate::CurrentCompatPropertyThief: add [[nodiscard]] to ctor
This is a RAII class, so it SHALL have a [[nodiscard]] ctor.

QUIP: 19
Pick-to: 6.7
Change-Id: I96728c04be3495d78a5c9c2ef105fbb4e53e58f0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 446e28926cbad9b5ff4b99e222a6bd4473b8c6fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-21 10:24:14 +00:00
Marc Mutz 3efd5950f3 QPropertyBindingPrivate: fix -Wshadow in sourceLocation()
This is preparation of applying headercheck to private headers, too.

Renaming the returned value to `result` also obsoletes the need for
the ugly this-> qualification, otherwise easily misread for a compiler
hint to look up the name in a template base class (which here does not
exist).

Amends 4d579851c8.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: Ib683f3deec492acdd2bc61806a8b0467f18f0fe8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 5cd3fec9f9a2bca8c27bdee6b185714983b5d11e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-21 10:24:08 +00:00
Marc Mutz 3acde1af11 QtPrivate::CurrentCompatPropertyThief: port to QScopedValueRollback
It's what the class is doing, with a bit of convenience on top, to get
from QBindingStatus* to its currentCompatProperty, so implement it
like that.

Simplifies the implementation and fixes a -Wshadow in the constructor.

Amends c4bfd32cca.

Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-126219
Change-Id: I4ce32e6ae6e6794b578d967c3e22854091470a14
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 97cd2e384960a4e9951bd906ba4c52e07c0ea4c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-21 10:24:01 +00:00
Marc Mutz 1939eba8a3 Inline qcorecmdlineargs_p.h into qcoreapplication.cpp
... its only remaining user.

Amends 71b54cc244, which removed the
only remaining non-qcoreapplication.cpp user of qWinCmdArgs().

In the process, rename the function to non-public-API-looking
winCmdArgs(), and adjust its Q_OS_ protection to what its caller uses
(Q_OS_WIN; was: Q_OS_WIN32).

As a drive-by, change an old-style- to reinterpret_cast.

Task-number: QTBUG-126219
Change-Id: Id37e62e9df2a0c44bb1e446e409fd36e11cb77ce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c59ebcfe72d1416897f251036db34902bbb39b1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-21 10:24:01 +00:00
Soheil Armin 1f0cf1e6e5 Android: Fix QtAbstractItemModel proxy threading problem
This change sets the thread affinity of the
QAndroidItemModelProxy instance to the Qt main thread,
enabling its APIs to be called from both the Qt main thread
and Android threads. Synchronization between threads is
ensured by using the newly introduced
QAndroidItemModelProxy::safeCall(), which utilizes
QMetaObject::invokeMethod() with the appropriate
connection type based on the calling thread.

For void functions, Qt::AutoConnection can be used.
Functions returning values will either use a
Qt::DirectConnection if invoked from the same thread as
the QAndroidItemModelProxy instance, or a
Qt::BlockingQueuedConnection if called from a different
thread.

Pick-to: 6.8.0
Fixes: QTBUG-127701
Change-Id: I214bc43d20d8bdf301fc97920493415d503d26d8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6c30a60a42800dd5d732d2c7018d87e8f3a9c6a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 17:38:32 +00:00
Ahmad Samir 78b35b6041 QTimerEvent: API docs: QChronoTimer doesn't have single-shot any more
Change-Id: I0c997befd752a1ca5c1bb12e4330970131d2f6e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2b24ad04d3438b0ae58ea36faa6015fbd7e3266f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 15:28:56 +00:00
Eirik Aavitsland d2b98a1147 Update bundled libjpeg-turbo to version 3.0.4
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 3.0.4

Pick-to: 6.8.0 6.7 6.7.3 6.5 6.2 5.15
Change-Id: Ifa437bfc9b99f386d792a045b0963f3690e322d9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit c1ee64834a04f03587d0a95d63365620951e072e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 12:21:27 +00:00
Liang Qi 21098bbb9c xcb: check validity of RandR output info before using it
Fixes: QTBUG-128906
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: Ibafdf4bb9c449b29437b0520299ab407238e5703
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 439e19be17b9169f5786b2593e6d1ac6978bb84b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 08:25:52 +00:00
Tim Blechmann c5a27f4cfe QObject: disconnect - document behavior with queued connections
QObject::disconnect does not cancel pending events. This can cause hard
to find bugs in application code, so we explicitly document and unit
test this behavior.

Task-number: QTBUG-127675
Change-Id: I5e94d60c27b9ce2dd2bceb832eb817b7eaa9cdcd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0681e720a9851f1873ce5a5f99b5567d2b418261)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 01:30:56 +00:00
David Faure 7f35844ed0 QTableView: fix moving rows by drag-n-drop
If we don't set dropEventMoved to true, then QAbstractItemView::startDrag
will delete the rows after the move (after QDrag::exec() returns).

Fixes: QTBUG-129128
Pick-to: 6.8.0
Change-Id: I85e7903a12b13c4b73e34fa1fcac56e50f421191
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d2384783477e88190fb87287bb9af8ea9a46343e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 22:50:38 +00:00
Paul Wicking 2c6720578e Doc: Specify correct target_link_libraries item for QRhi
Use the new `\qtcmaketargetitem` QDoc command to specify the correct
`target_link_libraries` item for items that belong to the new module.

Fixes: QTBUG-121855
Fixes: QTBUG-125994
Change-Id: I76a6ab749fdb349cc014f40bc7e548a0344bc50d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 9a9f5009006e03849242211d831a900e30c39fc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2024-09-19 20:31:56 +00:00
Vladimir Belyavsky 75adbe6161 QWindowsFontDatabase: use categorized logging more
Use "qt.qpa.fonts" logging category for the rest warning messages in
QWindowsFontDatabase.

Task-number: QTBUG-129118
Change-Id: I4e84af29fb6385142285954b0f508b412823c679
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 450f79ea15e0fc3c977aea2a7c513d384b3746b4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 20:11:16 +00:00
Christian Ehrlicher 7291d927bc QStyleHelper: export uniqueName()
Export QStyleHelper::uniqueName() so it can be used by windowsvista/11
style.

Change-Id: I07c1a63ff27688cba2a3747166f5e93ff61d2cd3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cc3b419855f6d1e62de7013bc8687eb81b41555d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 20:11:16 +00:00
Michał Łoś 3bb2f0d33b Disable QLocalSocket on VxWorks
VxWorks doesn't support local sockets. Since VxWorks clients don't need
support for that, turn it off.

Task-number: QTBUG-115777
Change-Id: Ibd95d375bb89d32e1ff8b9c2488c6e05910b0b92
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit acb97f06c6615b3292db769ea59266f7dc378636)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 17:54:42 +00:00
Marc Mutz ea855095a6 Remove unused qcorecmdlineargs_p.h from qcoreapplication_win.cpp
Amends 71b54cc244.

Change-Id: Ie4b83fa44956ec23615ddaea6bd4638be583318f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit f4e2c987300f5554c2125f05fad7bc6014b2d7c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 17:54:38 +00:00
Michał Łoś 0c4f0b557e Enable compilation of qtbase with localserver off
Since we will need to turn off this feature for certain platforms, code
must compile with QT_FEATURE_localserver turned off, which now can't.
Fix this by disabling parts of code requiring QT_FEATURE_localserver.

Task-number: QTBUG-115777
Change-Id: I6d78030db67ee679d6877b48a437db90a6e47a02
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 5bbb05c72c8b8f2d33beae722a704a1c293a55ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:47 +00:00
Vladimir Belyavsky 6a2035d970 QFontDatabase: use categorized logging more
Use "qt.text.font.db" logging category to print OpenType related
warnings during loading a font engine. Also, as a drive-by change,
use qUtf16Printable() to avoid unneeded allocations.

Task-number: QTBUG-129092
Change-Id: If603aa1251c0073aec7bb0ba75d3e5e9e0385ac1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 0c7a89f55e216d1f679fedf17f6d014ca722f735)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Ulf Hermann a3df6c36db QUrl: Keep one trailing slash when normalizing "file:///b/."
Removing the slash would be a drastic change in behavior. We can expect
many people to rely on the trailing slash to string-append further path
segments without inserting an extra slash.

Amends commit e7bcf41c0b23d83cfb31f966454945c705589a99.

Pick-to: 6.7 6.5
Fixes: QTBUG-128940
Change-Id: I71dfc957f383e4648b3b47a40aeb796d7237fb00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2addfa635d2f666d18ffc818f76eb673a6c787d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Volker Hilsheimer fd3482ea97 Android: iterate over const QJniArray
If/when we introduce mutable QJniArray iterators, then iterating over a
mutable array will be significantly more expensive due to the write-back
from the reference type.

Change-Id: I2e8eb357fdb6a9890699f5c61d49b635d303f301
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2d4f4220dd068c1253e701cdf6aefab17ef91c75)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Morten Sørvig 77aa6640fe wasm: fix drop of small files
On drop, close the file after write before sending the drop
event to make sure file content is flushed to to the
file system.

Pick-to: 6.8.0 6.7
Task-number: QTBUG-128855
Change-Id: Ide14bfebbdef07eee03ae1bd19d394da537ab123
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 0a37f038bfd7e18d9538dde8212a6c323eb4e70f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Wladimir Leuschner b51078e927 QWindows11Style: Fix disabled QPallete::windowText color in light theme
Fixes: QTBUG-128499
Pick-to: 6.7
Change-Id: Ib44998f8c55485df71d1fca0724c533f81405ff4
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ff1273b360a38418de22829ac815f6ffddd53ddf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 15:09:46 +00:00
Marc Mutz 1c3087b2e6 De-inline ~QDeviceClosedNotifier
This is weird, since Clang -Wweak-table didn't trigger here.

But -Wmarc did...

That's because the virtual functions behind the Q_OBJECT macro are
implemented in the moc file, so are actually out-of-line. And
~QObject() isn't the first virtual function in QObject...

Still define the destructor out-of-line, for consistency.

Amends ad265c55be.

Task-number: QTBUG-45582
Task-number: QTBUG-126219
Change-Id: Iada95966b7244873390f4c7ad42de9352311ca33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 41c5856ffa6cac43c15a6a43261b6693e7b0566f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 12:41:49 +00:00
Kai Köhne 9a8835c0d9 Doc: Fix qt_import_plugins snippet to use Qt6::
The documentation text uses Qt6:: instead of Qt::, so let's
also use that in the shown snippet. This is also the style
we promote for targets in other documentation pages.

While at it, print the target names consistently in monospace
font.

Pick-to: 6.7
Change-Id: Ia4d67bad2790d6688ef8d5b4103453c5c40877bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e836f8794403696a8467b69f0ab822d36b01a18c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 10:19:31 +00:00
Nils Petter Skålerud 3eecf663a4 iOS: Handle new contacts permission enumerator
iOS 18 added a new enumerator value for contact permissions,
"Limited". This value has not been added for any other permission
enumerator types such as camera. Currently we get compiler errors
for not explicitly handling this value in a switch case. This change
explicitly handles this enumerator and enables compilation.

Pick-to: 6.7 6.5
Change-Id: Idfc45902f9ae2e555fab8ba3d860a58d89651964
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0bc5e5ad0e490a1d8e140855b23abbb087c6f9a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:30:06 +00:00
Marc Mutz 9fc8edb826 qendian_p.h: fix -Wshadow warning
Rename the private member to m_storage. That is more churn than the
alternative of just renaming the ctor argument name, but is more
idiomatic.

This is in preparation of applying headercheck to private headers,
too.

Amends 38002df206.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: Id638a4c286f7a0ef6649017904ed190aab2631b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 7515c21f4badd80c09982901de8dfadf62401a3f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:00:29 +00:00
Marc Mutz 2143044682 qtextstream_p.h: fix -Wshadow in QDeviceClosedNotifier
Rename the data member to m_stream, as is idiomatic.

Amends 327b2ba3b7.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: I830e90e0a6c88acf95de8394e45cad075d4c924e
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit e585b937167b9746091c520e303657fbec2fe221)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:00:23 +00:00
Marc Mutz 339d339e9d corelib/time: fix (easy) -Wunused-const-variable warnings in _p.h's
Make the constexpr variables inline to silence Clang.

There's another batch of such warnings for the _data_p.h files, and
they are actually pointing to a real problem: If two TUs include these
headers, the static constexpr tables actually get duplicated. Created
QTBUG-128930 to track the issue.

Amends 6d97cf0e57 and
fa9244700e.

Pick-to: 6.7 6.5
Task-number: QTBUG-126219
Change-Id: Idb0cd55e424a870be6127fdf8399d01e9f3e9ac8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5064cb6feff6178cf3c307790ba028514c3d3040)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-19 09:00:18 +00:00