Commit Graph

63507 Commits

Author SHA1 Message Date
Tor Arne Vestbø
5ce4aecd49 embeddedwindows: Mask the painting manually by applying a clip
QWindow::setMask() is not guaranteed to turn the masked out areas
transparent, and it's up to the client to ensure this during
painting.

Pick-to: 6.6
Change-Id: I1155b3ad095152a993532f2290cacb670e20daa7
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-12 16:30:02 +02:00
Tor Arne Vestbø
61c043333b embeddedwindows: Fill bounds, instead of event rect
The event might come from a partial expose, but we want to
fill the entire bounds of the window, as we're filling with
a gradient.

Pick-to: 6.6
Change-Id: I66cedb160fb0ed06935c06ba2fe5dec9ed468833
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-09-12 16:30:00 +02:00
Tor Arne Vestbø
4e2e3a6b4f xcb: Reflect geometry of foreign window on creation
Pick-to: 6.6
Change-Id: I305b256696a32454f64c12c5a8901b65506fc520
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-09-12 16:29:58 +02:00
Ievgenii Meshcheriakov
f2a2c669f6 qdbus_symbols: Make major version list contexpr
It is never modified.

Change-Id: Ie87a0705e258c5977f352afdcfc3bee513b3bfb6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-12 16:21:20 +02:00
Ievgenii Meshcheriakov
d08d99a57b qdbus_symbols: Use QFunctionPointer typedef
This makes function declarations much easier to read.

Change-Id: Ib05433cda97a39f4a3b8c2759c32309a60716bfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-12 16:21:17 +02:00
Ievgenii Meshcheriakov
5fa733e632 qdbus_symbols.cpp: Include qdbus_symbols_p.h
Remove external declarations from the source file.

Change-Id: I9e43666fd646a2d3372607a4514f727ee80d2daf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-12 16:21:15 +02:00
Ievgenii Meshcheriakov
9d4e4deaa2 QDBusArgumentPrivate::createSignature: Accept QMetaType as argument
This gives more information than an int, also simplifies the code
slightly.

Change-Id: I76c00230386d74c70d294e638b4927de883f03ff
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-12 16:21:00 +02:00
Mikolaj Boc
647aca1e7c Enable qsettings tests on WASM
Task-number: QTBUG-115509
Change-Id: Ib33cfdf09c821e99f229ecfd0e7761b17fb4b672
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-09-12 16:13:59 +02:00
Joerg Bornemann
0efea8020c CMake: Fix build with CMake 3.28 on macOS
FindWrapOpenGL.cmake assumed that IMPORTED_LOCATION is the absolute path
of the library within the framework. That's not the case with CMake 3.28
anymore. There, IMPORTED_LOCATION is the absolute path of the framework
directory.

The relevant upstream CMake change is
6b01a27f901b5eb392955fea322cde44a1b782a3.

Pick-to: 6.2 6.5 6.6
Change-Id: I6b702a28318e0978c56dec83c398965aa77ef020
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-12 14:52:00 +02:00
Fabian Kosmale
53cc92334f Avoid unused-template warning on macOS with xcodebuild
Fixes: QTBUG-109874
Change-Id: Ic75643300ee3e27da758da3f44b5dc4caeb7814e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-12 14:52:00 +02:00
Santhosh Kumar
e418980b2f Update documentation for QPalette::accent API
The documentation for QPalette::accent had been missed and its updated
as part of this patchset.

Amends patchset 17c589df94.

Fixes: QTBUG-116930
Pick-to: 6.6
Change-Id: Iaa53e15dbecaa3c741e2db013c96b4424be39e91
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-09-12 12:36:09 +02:00
Vladimir Belyavsky
7efc0f6f19 QWindow: avoid extra window resize on changing min/max sizes
Amends e7477e8934.
Do not call QWindow::resize() on changing min/max sizes if
bounded window size has not changed. Otherwise it may unexpectedly
reset window's state on some platforms, like Windows and Linux.

Fixes: QTBUG-115699
Pick-to: 6.5 6.6
Change-Id: I217ca3fd854a1f41d6df312e3258734d1d3bce45
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-12 08:50:55 +03:00
Shawn Rutledge
63eaa3a989 Add manual test for QTextCursor::insert*
Visualize what's going on with tst_QTextCursor::insertMarkdown() at least.
But this could be expanded for other purposes.

It's also interesting to test drag-and-drop with this. And you can save
the result to any supported text format.

Change-Id: I363c32ff9b1bd7c53c562b08c58de95a69be0aa9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-09-12 06:20:23 +01:00
Marcin Zdunek
185627557e Fix undeclared identifier 'geteuid' for VxWorks
Task-number: QTBUG-115777
Change-Id: Ic95d5f92af185ac64b14ae6fafd4ffe507911f5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-12 02:07:04 +00:00
Anu Aliyas
8c468fc2ab [windeployqt] Copy v8 context snapshot
- Copy v8 context snapshot while creating package with windeployqt

Fixes: QTBUG-116777
Change-Id: I707e1d147ebf0ba5ee63dd25218e23ac850efe45
Pick-to: 6.6
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
2023-09-12 02:47:57 +02:00
Tor Arne Vestbø
c00b17de66 cmake: Don't pass -undefined,error to Apple linker
Error is the default for this option in ld64, and with the new linker
in Xcode 15 the option was deprecated, causing a warning, so let's just
skip adding it and assume undefined symbols results in errors.

Fixes: QTBUG-116732
Pick-to: 6.6 6.5
Change-Id: I736a891ae102fe1dfb2cdf869f42c665e231adba
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-12 02:47:24 +02:00
Tor Arne Vestbø
3cb3c1d9a8 xcb: Implement native window helper for embeddedwindows/foreign window test
Pick-to: 6.6
Change-Id: I73720f8f49a5d7e5df7c95bf4b17ef910180e01c
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-09-12 02:47:24 +02:00
Rami Potinkara
bbf0022d99 Update mobile example categories for Qt 6.6
Add mobile example category tags for the chosen examples.
Add for the ones that work best for both, Android and iOS.
Remove from the ones that do not work for both (at least yet).

Added
- hellogles3
Removed
- qtandroidnotifier (not iOS)

Fixes: QTBUG-116780
Pick-to: 6.6
Change-Id: Icb4c7ba1f22d4e67089a565071d83cdf8ec95896
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-12 00:44:11 +00:00
Ivan Solovev
5a1a80861f Add QSqlField::swap() documentation
Fixes: QTBUG-116937
Pick-to: 6.6
Change-Id: Ic5f08c3a7d0f2c0c926ced0d194fd5a2aea191fd
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-12 02:35:03 +02:00
Anton Kudryavtsev
7b4c8dd8c2 Qt::mightBeRichText: use QVLA more
to reduce allocations

Change-Id: I59e131bcdd626f740a73e621b926f4c7dad4738a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-12 02:00:03 +03:00
Anton Kudryavtsev
c0e5464d28 printsupport: use string view types more
sizeof(QStringView) == 16
sizeof(QString) == 24

Change-Id: I3edf0d6869e92c47472980e5f99b9bf9c8a3b7cd
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-12 02:00:03 +03:00
Anton Kudryavtsev
ae6a3fd26c Tidy up QNetworkDiskCache::prepare
use std::nothrow more

Change-Id: I7c681089777e86a31db2fba831362771e6607496
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-12 02:00:03 +03:00
Edward Welbourne
e67f030600 Make \brief of Saving a Game to File actually brief
Specifically, prune it to fit on a single line.
Much of what it was saying was implicit in its context already.
It also neglected to mention CBOR's part in the story.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I161a345cbbea8b706490fcbbadecd01b8946af31
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-11 17:56:51 +02:00
Edward Welbourne
31524cef8e Fix neglected wording about separators added in 6.7
In the documentation of the TagSeparator parameters of three QLocale
methods, I neglected to mention they were added at 6.7. This amends
commits 91e70f239e and
15cfdab514 in which I added these
parameters.

Change-Id: I11462b88305255359d4e9b144b000cffe9a142ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-09-11 17:56:14 +02:00
Topi Reinio
c46551e203 Doc: Fix documentation issues
Fix the following QDoc warnings:

* warning: Can't link to 'QRhiWidget::sampleConut'
* warning: Can't link to '`Q_NODISCARD_CTOR'
* warning: Invalid '\relates' (already a member of 'QEventLoopLocker')
* warning: Unknown command '\relatesalso'
* warning: Undocumented parameter 'separator' in QLocale::name()
* warning: clang couldn't find function when parsing \fn void QRhiWidget::framePresented()

In QAtomicPointer, work around the issue of QDoc not supporting
multiple \relates command for a single topic by adding a see-also
link to the global qYieldCpu() function.

Document the qvariant_cast() overload taking an rvalue reference.

Change-Id: I2528eee666149a97a14be059bbed537636d7aa0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 15:56:10 +00:00
Giuseppe D'Angelo
c7486cd665 QPolygon(F): streamline the QDebug streaming operator
Just re-use the private functionality present elsewhere. As a drive-by
fix this will also properly separate the individual points with commas,
making the output readable again.

Before:

> QPolygonF(QPointF(0,0)QPointF(93.75,0)QPointF(93.75,62.5)QPointF(0,62.5))

After:

> QPolygonF(QPointF(0,0), QPointF(93.75,0), QPointF(93.75,62.5), QPointF(0,62.5))

Change-Id: I0cf0408bfb2fe72974e4dbd5d2958c5a2aa56b5f
Pick-to: 6.6 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-11 17:55:54 +02:00
Paul Wicking
8f448d7ac7 Doc: Add missing since to enum value
Task-number: QTBUG-116848
Pick-to: 6.6
Change-Id: Ia137a21de5bab406a133ee032b6ccf3089de8d22
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Fredrik Ålund <fredrik.alund@mimer.com>
2023-09-11 17:50:15 +02:00
Ievgenii Meshcheriakov
7e3d29f618 QDBusConnectionPrivate: Use write lock inside handleSignal()
Slots like (un)registerServiceNoLock() modify shared state and
should be run with write lock taken. Having only read lock results
in hard to reproduce crashes.

Task-number: QTBUG-116621
Change-Id: I4456b64f9f2200378012822143e1a05345859d62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 15:26:56 +02:00
Ievgenii Meshcheriakov
9ff099e966 QDBusArgumentPrivate: Remove duplicate public sections
Do the same for the derived classes.

Change-Id: Ieec1d222a96775d57af91f9c6757648561b75e53
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-11 15:26:56 +02:00
Ievgenii Meshcheriakov
4c2f944958 QDBusConnectionPrivate: Remove parent argument
This class is reference counted, having a parent would
interfere with this reference counting code.

Change-Id: I5ab4fdfa74af94d8b760bd3600bd1f828e3d2b91
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 15:26:56 +02:00
Jaishree Vyas
29eb5d8ace Doc: All overviews list categorization
The \generate list names are added for each categorized section with
some explanation. Here, calling the overviews as
explanations-(name of the section). The idea is to give general terms
instead of specific phrases like 'core' etc, for better understanding.

Task-number: QTBUG-115347
Pick-to: 6.5 6.6
Change-Id: I673e38c0e9193b7f7d54008bfcf82c2d3a10be3f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-09-11 15:26:56 +02:00
Axel Spoerl
edc984db38 QDialogButtonBox: Manage hide and show of standard buttons
0b421fa58b9a73d657bf17834788fd1175c4767e ensured a correct focus chain,
when buttons in a QDialogButtonBox were hidden.

The implementation did not check, if a hidden button was added via
setStandardButtons(). In consequence, it was removed from the
standardButtonHash and never added again.
QDialogButtonBox::button() returned nullptr for a standard button,
once it had been hidden. That introduced a regression.

This follow-up patch makes sure, a standard button is not removed
from standardButtonHash, when hidden. By no longer removing it from
standardButtonHash, it makes showQDialogButtonBox::button() always
return the pointer to the standard button, even if it is hidden.

The function handleButtonDestroyed() used the argument
QDialogButtonBoxPrivate::RemoveRule::KeepConnections, in order to leave
signal/slot connections untouched. It expected the the destroyed button
to be removed from standardButtonHash. In order to retain that
functionality, the enum class RemoveRule is renamed to RemoveReason,
and one value was added. QDialogButtonBoxPrivate now handles all
necessary cases of removing a button:

ManualRemove (previously Disconnect):
- remove button from roles
- remove button from standardButtonHash
- disconnect all signals

LeaveEvent (previously KeepConnections):
- remove button from roles
- do not remove button form standardButtonHash
- do not disconnect signals

Destroyed (new):
- remove button from roles
- remove button from standardButtonHash
- do not disconnect signals (QObject will do that)

An autotest is added to tst_QDialogButtonBox.

Task-number: QTBUG-114377
Pick-to: 6.6 6.5
Change-Id: Ib28625d44fa89c3d06f181f64875c2e456cebbfa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-11 13:26:56 +00:00
Rym Bouabid
36c2a9c514 Revamp Mandelbrot example: Fix too long lines
Fix code lines that do not respect the 100 characters limit rule.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: Idbc148b77b52a359d972233c977bbf2ccf9fcd24
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-11 15:05:47 +02:00
Rym Bouabid
ae0d545d31 Revamp Mandelbrot example: Use a Literal operator to create QString
Create QString at compile time using the literal operator""s instead of
using pointers to characters. This way, no conversion or allocation will
occur at runtime.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: I4fb51d74abbbfa08fb9fddfa90d8afcebd82a7e2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-11 15:05:47 +02:00
Rym Bouabid
a4d7a4ccb3 Revamp Mandelbrot example: Fix Includes
Reorder the includes following the coding conventions.

Remove unneeded includes.

Add needed includes to avoid Transitive includes.

QGestureEvent is passed by a pointer in the gestureEvent method in
mandelbrotwidget.h. So, we do not really need to include the header.
Instead, forward-declare QGestureEvent class in a namespace.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: I48cfd663bf98350281ef7f31e6c0ef3e301a08ca
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-11 15:05:47 +02:00
Alexey Edelev
7a70c6fcfd Require the C++17 standard for configure-time syncqt
Require the C++17 standard, but not what is set by Qt for syncqt,
to avoid unwanted standard check in some corner cases.

Pick-to: 6.5 6.6
Task-number: QTBUG-116789
Change-Id: I34e07e172e31d5ffc69b84dd3ef30f02f6e75a9d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-11 15:05:47 +02:00
Alexey Edelev
9d11e50190 Add variable linked to configure-time executables to detect CMakeCache wiping
Wiping of CMakeCache should lead to removing of CMakeCache that is
generated for configure-time executable. Otherwise configure-time
executables might still use wrong compiler or compiler flags.

Pick-to: 6.6 6.5
Task-number: QTBUG-116789
Change-Id: I702d5d29e0c5f35a8a36311cf9a84ea7a0f4d781
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-11 15:05:47 +02:00
Nicholas Bennett
a9c63e826c Docs: Add macros for common Qt products
Added macros for Qt for Android Automotive, Qt Online Installer, and
Qt Maintenance Tool.

Task-number: QTBUG-116562
Pick-to: 6.2 6.5 6.6
Change-Id: I0ef3bc0fd6b1ddf94c8be2feed7cf5e691c4776f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Esa Törmänen <esa.tormanen@qt.io>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
2023-09-11 07:44:37 +00:00
Lorn Potter
eda0ccb36b wasm: send key release for touchscreen input
Fixes: QTBUG-114203
Pick-to: 6.6 6.5
Change-Id: I117ce857484520167d0c0166280dd604c139ff03
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-09-11 08:45:49 +10:00
Ievgenii Meshcheriakov
087d267a44 QDBusConnectionPrivate: Remove declaration of messageFilter()
The function is declared but never defined.

Change-Id: Ic9c4369ecaee3103b74d2dc9b84cbece99379603
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 00:32:40 +02:00
Ievgenii Meshcheriakov
fa78a9f5bd QtDBus: Remove uses of Q_UNUSED on used variables
This also includes variables only used in Q_ASSERT, those
don't generate warnings anymore even when asserts are disabled.

Change-Id: Ia557120d442c100c9437b106a01a4079d48640af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 00:32:40 +02:00
Ievgenii Meshcheriakov
dad421222c QDBus: Use type-safe object tree node flags
Change-Id: I7078b11d19d7a6444a020e0d400efbaea22f84a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 00:32:40 +02:00
Ievgenii Meshcheriakov
588700dbfa QDBusSlotCache: Include flags into the hash key
This removes the need for doing two separate iteration to find
entries in the hash. Also QMultyHash can now be replaced by
plain QHash.

Change-Id: Ie704e74c1dbb0c8e40d22a7cd572fcc8a3bfcd5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 00:32:40 +02:00
Kai Köhne
9aaeb1bb3d Doc: Remove see also self-reference in QFileInfo
Pick-to: 6.6
Change-Id: I83f42f85e838c953b19dbcbb8d656408ed148934
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-10 20:22:37 +02:00
Kai Köhne
7c5e64eb0a Doc: Mark QEvent::DevicePixelRatioChange as new in 6.6
Fixes: QTBUG-116872
Pick-to: 6.6
Change-Id: I5094a0c0f3deed1e4f6b59e577367c220be8774e
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2023-09-10 20:22:15 +02:00
Kai Köhne
ef748095fe Doc: Add documentation for added QNativeIpcKey overload
Document new implicit constructor introduced in the commit 08605f0d78

Pick-to: 6.6
Fixes: QTBUG-116870
Change-Id: I518f0a043d7738698ae568ce0b51db3f2c28574f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2023-09-10 20:22:07 +02:00
Ahmad Samir
74098981bd QDataStream: clarify QDataStream::operator>>(char *&s) API docs
The wording was slightly ambiguous giving readers the idea that it will
scan for a \0 terminator in the data; however what actually happens is
that readBytes() gets the length of the string from a quint32 in the
stream right before the data, and readBytes() always adds a
null-terminator.

Fixes: QTBUG-3287
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ie22500a9c191ffd590a6b57babeb67577c24dddb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-10 17:50:11 +03:00
Ahmad Samir
1849489315 QFSFileEngine: fix logic
Inside the do-while loop the if body is executed if `eof` is true, which
means the continue statement is redundant because the while loop
condition contains `!eof`, so the do-while body doesn't get executed
again after that.

Change-Id: If0685eb482f29b88e9c8660886392483a3bd75ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-10 15:15:09 +03:00
Ahmad Samir
3fbcf53828 QElapsedTimer: document Duration and TimePoint typedefs
Fixes: QTBUG-116876
Pick-to: 6.6
Change-Id: I71215d9f9e3caf0c50635a86c65c94a6f097cbe0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-10 15:15:00 +03:00
Ahmad Samir
b0a3cfaf53 QStringList: optimize replaceInStrings
By first checking if the list has any matches before potentially making
it detach.

Change-Id: I7a42c2910ef6efc45033e562573414a3a9ef972e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-10 15:14:50 +03:00