68796 Commits

Author SHA1 Message Date
Axel Spoerl
c20a382023 Send events as spontaneous in QWindowPrivate::forwardToPopup()
QWindowPrivate::forwardToPopup() sends key events with
QCoreApplication::sendEvent(), which sets QEvent::m_spont to false.
That makes key and pointer events sent to popups appear synthetic,
while they are sponaneous if sent to other widgets.

The method has been newly implemented in the course of moving
popup handling from QApplication to QGuiApplication.

Make current behavior consistent to the behavior prior to
e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9.
Since events are always spontaneous, use
QCoreApplication::sendSpontaneousEvent() instead.

Add a test function to tst_QComboBox to Verify, that key events
- are sent directly to the popup
- not seen by the window
- appear as spontaneous.

This amends e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9.

Fixes: QTBUG-129258
Pick-to: 6.8.0
Change-Id: Iff61b98b290f6483948007b5f12b19393759d9db
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3fbae61ea245291cb4c34e9126562c307741a600)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 19:59:42 +00:00
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
Tor Arne Vestbø
f5e0d2e879 selftest: Disable NSLog/CFLog output to stderr
Ideally we want to catch if any of our selftests produce errors or
warnings from system frameworks that are out fault, but in this case
the warning does not seem to be something we can do anything about.

The "+[IMKClient subclass]: chose IMKClient_Legacy" warning is logged
via NSLog, so as a workaround we disable NSLog/CFLog output to stderr.

Change-Id: I17b6b83844c4160aa5980d954b70f2582ff94da5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 493fa52e135f73c1496715bb45602d9a4da1ade4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-25 17:23:48 +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 c0014becca2cd376eadd5c8a0265e5cf47c9aa01, 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 c0014becca2cd376eadd5c8a0265e5cf47c9aa01.

 <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
c1b13a0c5f moc: add a test for Q_FLAG getter/setter on integers
This is legacy behavior from Qt 3, before we had QFlags and before
QVariant could support user types. I cannot find any instance of a
getter returning an integer in current Qt or Qt Creator code. And note
this only compiles if the flags type with Q_FLAG - not Q_ENUM.

The content is wrapped as Qt 6.x only so it can be removed in Qt
7.0. The deprecation warning will come in a later commit, for 6.9.

Change-Id: Ie3ddd8025e3b4387866efffd8e8d46c3daa0dff2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 939f7f56227e65c9797d17640a7b9c29166efc44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-24 20:30:14 +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 e816f915411a0f517021769abd8919a423f635c3 ("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
Volker Hilsheimer
22a6dd8a66 Vulkan test: replace QVERIFY with appropriate QCOMPARE
The test has started to be rather flaky, and QCOMPARE provides better
diagnostic messages when failing, printing both the actual and the
expected value.

Pick-to: 6.5
Change-Id: I262e8e85de596ff3502e02ae26a1dd2724af92de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d736a5e00030058f90a5f83316581e86e434c119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 19:36:54 +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
Tor Arne Vestbø
3c6618b0f0 Unblacklist tst_QGraphicsProxyWidget::windowOpacity on macOS
Setting the opacity on an NSWindow does not result in a paint event.

Change-Id: I6d2780191ba97082f7ca80e2aa1094ccf796fb75
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3d1ec9ee94bac4222637bc9791ffc4d051c08fbd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 16:57:33 +00:00
Tor Arne Vestbø
964b16e6d3 tst_QWidget::tabOrderWithProxyOutOfOrder: Ensure Qt::TabFocusAllControls
The test requires Qt::TabFocusAllControls, so Qt::TabFocusTextControls
and/or Qt::TabFocusListControls, which is the default on macOS, is not
sufficient.

Change-Id: Iaf84c7ba67b978b942f396911048716417c38c03
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 283cfe0b80f83833a549d79e2787f5b936d90236)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 14:44:13 +00:00
Tor Arne Vestbø
bab5421dbf tst_QDialogButtonBox::hideAndShowButton: Check for Qt::TabFocusAllControls
The test requires Qt::TabFocusAllControls, so Qt::TabFocusTextControls
and/or Qt::TabFocusListControls, which is the default on macOS, is not
sufficient.

Change-Id: Ideb673f570125c0d73c67a408f3d144f29052ace
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0a1c5d6e7de13afdb76161a6655d1024df03f454)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-23 14:43:44 +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 17763a7b31c1f6df6f7725c4b67e5dcc4d3b00fb, but not picking back
further than f8da484d5741d1191504eefddf5134fd7009e16a, 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 4d579851c842e136fbaf7a5d629c249456a91e39.

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 c4bfd32cca547504ebccfad3da4e73a2b712baea.

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 71b54cc24431e8bc6e97f5d62132bd5261764c3a, 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
Liang Qi
950f928837 tests: blacklist tst_QStatusBar::QTBUG4334_hiddenOnMaximizedWindow()
on u24.04 x11

Task-number: QTBUG-129027
Change-Id: I7bbcf0e715b620d1f835fa361acbcbad32cbc57e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0dfb1acfe1f3b7437775880d2f8863732c09c1e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 15:28:58 +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
Paul Wicking
0d58653758 Doc: Drop parentheses and fifth macro argument in offline '\grid'
The parenthesis ends up without content, and that looks confusing and
broken in e.g. Qt Assistant.

Fixes: QTBUG-120151
Pick-to: 6.8.0
Change-Id: Ib616741bc0463e8bece481c2a37cd7c3992921ab
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 2c9968bee56373f36e6ceb616befdf2657f24859)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 15:23:59 +00:00
Andreas Eliasson
9d7571e1a0 Doc: Pad text and pre code blocks in tabs
Use the pre element selector, not the .pre class selector to add correct
padding to pre code blocks and non-code blocks.

Pick-to: 6.7 6.5 6.2
Change-Id: I14886f44597354c81840a866c75caa62387a7375
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e01ba1824ee27ebafe8cde79e0e0e0d36dcf3467)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 15:23:59 +00:00
Liang Qi
d51205b0b4 tests: port touchGraphicsItem to Qt 6
Replace deprecated APIs with recent ones:
* QTouchEvent::touchPoints() -> points()
* QEventPoint::pos() -> position()
* QPointingDevice::Capabilities and etc -> QInputDevice::Capability

Pick-to: 6.5 6.2
Change-Id: I45335886199a65e519cbd4872138e0715dd08103
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 1b5c6d0009fb2f3b418b84ae610c1ed39509c0e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 15:23:58 +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
Liang Qi
59a3f43031 tests: blacklist tst_QWidget_window::setWindowState(maximized)
on u24.04 x11

Task-number: QTBUG-129026
Change-Id: I14bf0ff3f2704aa1f7fccfdd57164f935892ae46
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 90ed33091a62ddfd53fc2cd8c232089367aca80b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:43:17 +00:00
Liang Qi
802c798703 tests: update row names in tst_QWidget_window::setWindowState()
Task-number: QTBUG-129026
Change-Id: I18c02b0a099924bd64115a1721c1d4f26b91f110
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 0c1c91aee9c9f4aa2e67412ebec885f92f06a5dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:43:10 +00:00
Liang Qi
e68e6be13b tests: blacklist tst_QComboBox:popupPositionAfterStyleChange()
on u24.04 x11

Task-number: QTBUG-129029
Change-Id: I1a7330fc781e1ca925234bc0f0548968bee1b984
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9f7c826d62c5ef788930a4ef0176226fd6eef53d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:43:04 +00:00
Liang Qi
8b3db397f2 tests: blacklist tst_QWindow::windowExposedAfterReparent() on u24.04 x11
Task-number: QTBUG-129023
Change-Id: I444194f0cb649a3f0c630f1f8114f89a8b408cdc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 24403f0ed5e9f029d84a2e73a98a447bda276b5b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-20 00:42:58 +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