Commit Graph

63281 Commits

Author SHA1 Message Date
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
Ahmad Samir
f7ecad0264 QStringList: replace index-based loops with range-for
Use a lambda instead of a struct with operator(), it's only used in one
place and a lambda is more optimizable.

Change-Id: If3917f4819a7c886a08ad1396d92fcbcf606cbcb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-10 15:14:17 +03:00
Ahmad Samir
ada0e8be5d QStringList: test indexOf/lastIndexOf(QRegularExpression) overloads
Change-Id: I8c62b0d36628c2a1519667cc553f3ec33b964dfc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-10 15:13:05 +03:00
Anton Kudryavtsev
567bbbb3e9 qdataurl: extract string literals
to reuse size() to avoid magic numbers

Change-Id: Id1dc69a024ce5597c2d1468e7cb1470df728d84c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-10 12:02:42 +03:00
Anton Kudryavtsev
bb5e3b56db QTextHtmlParser::lookupElement: port to QSV
Change-Id: I7d45d1a8985b57457eaa8226332929b6a1817108
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-10 12:02:34 +03:00
Thiago Macieira
b24630ce02 QLogging: attempt to free memory in qt_message() before abort()
Just so memory leak checkers won't complain.

Pick-to: 6.6
Change-Id: I2b24e1d3cad44897906efffd177fb9ddf0eb0a2a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-09 11:55:41 -07:00
Thiago Macieira
62b53011d3 QNetworkInterface: replace CMake check for ifr_index with SFINAE
Detecting if a member exists is very easy and saves us from running the
test at CMake time. Saves about 350 ms.

Change-Id: I2b24e1d3cad44897906efffd178007fdcdd18e37
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-09 11:55:41 -07:00
Thiago Macieira
88e9ce201b QLogging: deduplicate calling of isFatal()/qt_message_fatal()
Just roll everything up into qt_message().

Pick-to: 6.6
Change-Id: I2b24e1d3cad44897906efffd177fb9867131b795
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-09-09 11:55:41 -07:00
Thiago Macieira
3bdb5e9cc9 QElfParser: handle the case of PN_XNUM program headers
This is an extension point when you have more than 65535 program
headers. Hopefully no one has that many.

Change-Id: Ifbf974a4d10745b099b1fffd177710fae9c31b97
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-09 11:55:41 -07:00
Anton Kudryavtsev
de6d322174 qsocks5socketengine: avoid impicit detach
by const method usage

Change-Id: I0ff04508917a728acec282920df02c667a29e597
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-09 17:14:46 +03:00
Anton Kudryavtsev
abef00138f qiosclipboard: use const methods more
to avoid imlicit detach. While touching code, add reserve usage

Change-Id: I9dcd916f2210537c3f1d695e3e68b53da735d978
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-09 17:14:43 +03:00
Anton Kudryavtsev
6a1a11879d qcocoadrag: use rvalue overload more
to reuse internal buffer

Change-Id: Iab24bf8ff40edc1b64227ab6dbdff02f926b1008
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-09 17:14:40 +03:00
Anton Kudryavtsev
f5478b8a63 cocoa: use const method more
to avoid implicit detach

Change-Id: Ifeea193639f357cc53f8af884ae868a18149fbc8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-09 17:14:38 +03:00
Anton Kudryavtsev
87b5d85641 QAndroidPlatformFileDialogHelper: use const methods more
to avoid implicit detach

Change-Id: I5dd37469011ddb0df8c6935deb102098f09a2a45
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-09 17:14:36 +03:00
Anton Kudryavtsev
2c67774f99 gui/text: use const methods more
to avoid implicit detach

Change-Id: I2c6edfcf8b9dc6e9bb0801b7bd58f34a8033a955
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-09 17:14:33 +03:00
Anton Kudryavtsev
14505ca278 gui: use const methods more
to avoid implicit detach

Change-Id: I2c7ae56e0866941e0f0b040129bfc40a9a961f3c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-09 17:14:30 +03:00
Anton Kudryavtsev
2c1fdad76c qcommandlineparser: use const method more
to avoid implicit detach

Change-Id: If01c2d777ceb61e9f919ff0109d054bb7e74a418
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-09 17:14:25 +03:00
Volker Hilsheimer
a7b50c40a0 macOS file dialog refactor: don't heap allocate string and string list
We always allocated them in the constructor function, and never tested
them for nullptr, so just manage them as regular members.

As a drive-by, apply const to read-only variables in relevant code.

Pick-to: 6.6
Change-Id: If0a3ac8982582f2adf5187a3c0357f4da93467fb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-08 23:41:15 +02:00
Giuseppe D'Angelo
2f945aaa26 QProcess: remove a XFAIL for QNX
91dcc76fc1 might have fixed the underlying issue, so we no longer
need the XFAIL codepath at all.

Fixes: QTBUG-114720
Change-Id: I67ccbed67a0536b679c50c26eb0b3e51c93dceeb
Pick-to: 6.6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-08 19:00:49 +02:00
Tor Arne Vestbø
e9a1c53214 Add note to QMessageBox::button() about modifying returned button
We don't have a good way to detect whether the button is modified or
not, to bail out of using the native dialog helpers.

Document that this API shouldn't be used to modify the standard
buttons (they are standard after all), and recommend the explicit
APIs for adding custom buttons instead.

Pick-to: 6.6
Fixes: QTBUG-112525
Change-Id: I38c8ef5e1717a85f0db59c9e705d0775982ffb57
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-08 19:00:49 +02:00
Tor Arne Vestbø
a7bfe58989 doc: Fix links to QMesssageBox::Option::DontUseNativeDialog
Pick-to: 6.6
Change-Id: Icb6f28bb17ade242f6ef5dcc4ea65611a6abe9f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-08 19:00:49 +02:00
Tor Arne Vestbø
17dc1e2152 Rework QIcon theme documentation
Generalized the documentation, and clarified behaviors,
in preparation for adding additional platform icon engines.

Pick-to: 6.6
Change-Id: I4a694dc2cedd08cb195c738048c7dae72cbfe867
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-08 19:00:49 +02:00
Assam Boudjelthia
c76918eca2 CMake:Android: Add jar files to a ${target}JarSources
For better integrations with Qt Creator, add a custom target with
the Jar files so they are shown under the project files. Since
source_group() is not supported, add_custom_target() is used.

Pick-to: 6.6 6.5
Change-Id: Ie527fdce918d526ee6e8953e27d4e0f4131a9828
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-08 16:48:33 +00:00
Fredrik Ålund
d21003fc48 Add macOS support for the Mimer SQL QtSql plugin
Make sure the Mimer SQL include files and libraries are found
to enable the Mimer SQL QtSql plugin.

Fixes: QTBUG-111219
Pick-to: 6.6
Change-Id: Ieee0e26f3689dd373fda81c98180066927d25b40
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-08 18:48:33 +02:00
Edward Welbourne
e53d0220da Turn Directions enum into an enum class in serialization converter
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ie1f8ea5e2575427528c19875db7a8e4e27200aec
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-08 18:17:37 +02:00
Edward Welbourne
ad63118071 Turn Converter::Direction into a QFlags enum
This lets us testFlag() instead of using raw bit-field operations.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I2c26e9a24728e81baa42cf14c75271a015460913
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-08 18:17:37 +02:00
Edward Welbourne
77fdd21cbf Serialization converter example: const-ify the Converter type
Its methods act on their parameters without changing the converter, so
can all be const. Its instances thus have no non-const members to
exercise, so can always be const.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ifcdb2f2159c2cfcd7998dd118aa327a32d299ccf
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-08 18:17:37 +02:00