Commit Graph

66020 Commits (56e151663ebfd4fc0876d33f22c81f0218339914)

Author SHA1 Message Date
Marc Mutz e3c831dc55 QOperatingSystemVersion: fix UB (invalid static_cast)
When the QOSVBase we're constructing from isn't an actual
QOSVUnexported, the cast from QOSVBase to QOSVUnexported is
invalid. Instead of casting, add an QOSVUnexported(QOSVBase) ctor and
just call that.

Amends 2156778184.

Pick-to: 6.7 6.6
Change-Id: I7352a044b62086585f1b036433f9b8779c77ac9d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-23 00:10:05 +01:00
Marc Mutz 1b89d747d7 CompactStorage: make it default-constructible again
When 30a8e79243 added constructors as a
work-arund for an MSVC issue, the default contructor became deleted.

This hasn't caused trouble so far, as all users apparently pass a
payload object, but I'm about to merge a new user that doesn't, so
this came up.

Fix by bringing the default ctor back using =default.

Amends 30a8e79243.

Pick-to: 6.7 6.6
Change-Id: Iaf1a9536c2e0b24a62fdd55c837478a3450da38c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-02-23 00:10:05 +01:00
Jonas Karlsson aedbc7ba7a rhi: gl: Add R16F/R32F handling in pixel readback
When reading pixels back from a QRhiTexture if the format is R16F/R32F
then we will read pixels to a buffer with just a red component comprised
of (half) floats instead of the default case (RGBA). This is useful when
reading back a shadow map.

Change-Id: Iff2881992f0341252d5c565b5dd64bed078319bc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-22 23:08:34 +01:00
Thiago Macieira 4c1e23c9d3 QFileSystemIterator/Darwin: enforce NFC encoding in QString
Amends 83f7125ac8. We replaced
QFile::decodeName() with QStringDecoder so we'd know whether the
decoding from UTF-8 had failed, but forgot about Darwin's enforced
normalization.

Fixes: QTBUG-122624
Change-Id: I01ec3c774d9943adb903fffd17b5edc54c34c067
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-22 14:00:33 -08:00
Volker Hilsheimer 77e00a4d08 JNI: Support declared QtJniTypes in QJniArray
They can be treated like QJniObject, but are not QJniObject instances.

Pick-to: 6.7
Change-Id: I419b6d0493f9a0ad3dcc726d48ac4c9ad3e6bc19
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-22 20:43:50 +01:00
Volker Hilsheimer d51a47c316 Apple: use xmark.circle for the "clear" icon
Looks better as the action in a text input field.

Pick-to: 6.7
Change-Id: I63fd9b963102919cf69f345723d1c5d83778f1f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Karolina Sofia Bang <karolina.bang@qt.io>
2024-02-22 20:43:50 +01:00
André Klitzing 11259972a3 Remove ; after QT_DECLARE_EXTERN_RESOURCE
This avoids a warning with clang compiler.

error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
QT_DECLARE_EXTERN_RESOURCE(AusweisAppQmlModuleMoreView_raw_qml_0);

Pick-to: 6.7
Change-Id: Id289080884ba2b017e884a15debfdd46102f1093
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-22 19:09:36 +01:00
Marc Mutz 02d7c8c069 QDBusIntrospection: make DiagnosticsReporter safe to use
Add a virtual destructor to this polymorphic class and disable copying
(requires to bring the default ctor back manually, and to export the
class nested in an exported class).

Amends 248d2103b5.

Pick-to: 6.7
Change-Id: I9008e4ecebca34feac6ae92fa026f2673b652ba9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-22 16:57:17 +01:00
Marc Mutz 448d4f847a QDBusIntrospection: fix position of Annotation definition
When 2e8a48c1cd made
Annotations::mapped_type a struct Annotation instead of just QString,
it inserted the Annotation definition after the first inline user of
Annotations (struct Method).

I don't know why this compiled in the first place, but it did,
probably because of the re-parse-everything-at-closing-of-class rule,
but there's no reason to not move it to before the first users, so do
that.

Found while trying to make QDBusIntrospection a namespace instead of a
struct.

Amends 2e8a48c1cd.

Pick-to: 6.7
Change-Id: I316cb5e49f3476adc5ff5abb023b9d74303ab640
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-22 15:57:17 +00:00
Tinja Paavoseppä 211e51b81e Android: Add QtEditText to QtWindow in constructor
Of course, createSurface() is called more than once, for example
when coming back from the background, and you cannot add a View
to the layout more than once, since this leads to an uncaught
exception and a crash.

So add the QtEditText once, in the constructor, as is indeed
sensible.

Fixes: QTBUG-122648
Pick-to: 6.7
Change-Id: I7ef48951cd8a1c99935f5e96c70b6dbf0c745803
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-22 17:57:17 +02:00
Simo Fält df1efc70b0 COIN: Move skipping Debian instructions to qt5 repo
Pick-to: 6.6 6.7
Task-number: QTBUG-122447
Change-Id: I385d60d891c68edc3aa053d3561335a46b26923b
Reviewed-by: Toni Saario <toni.saario@qt.io>
2024-02-22 15:54:25 +00:00
Volker Hilsheimer 576c9160b1 Try to stabilize tst_QApplication::abortQuitOnShow
The test has been very flaky recently. A zero timer might be processed
before the window became visible, so only start closing once the window
has been shown.

Pick-to: 6.7 6.6
Change-Id: If7983723bb8abd2f3495fb21114c517289ebe8d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-22 16:54:25 +01:00
Allan Sandfeld Jensen b697de79b0 Fix support for Input color spaces
Not really a common use-case and shouldnt be in images anyway, but
we have the code to support it, except it had a typo in it.

Pick-to: 6.7 6.6 6.5
Change-Id: I8585eaf7be82f13e61c94430743d765359fa48fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-22 16:08:32 +01:00
Julian Greilich 950998223b Revert "Android: move referral global field to local variable in QtActivityBase"
This reverts commit 5b5f4344da.

Reason for revert: Without the key being public, we would have to duplicate this variable in our application code when fetching the stored referrer.

Pick-to: 6.7
Change-Id: I46ad3618da9912c41f8248f871c24dd41015af2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-02-22 15:08:32 +00:00
Alexey Edelev 7ac969e146 Wrap condition in _qt_internal_check_depfile_support with parentheses
The AND/OR combinations are not evaluated correctly. Wrap them with
parentheses explicitly to ensure the expected evaluation order.

Pick-to: 6.5 6.6 6.7
Change-Id: Ib2515ba85417b32cef3f799e0cb2c89d2c4257ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-22 16:08:32 +01:00
Laszlo Agocs cff5a49cc2 rhi: d3d11: Flush() when destroying a swapchain
Task-number: QTBUG-120276
Pick-to: 6.7 6.6 6.5
Change-Id: Iaf79c4dcf60d9a52bd562fd94976402cf570147d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-22 13:57:33 +01:00
Petri Virkkunen 7bbd39c4c9 Move QtDisplayManager dpi calculations to functions
In order to use the same functionality from outside the class and avoid
reimplementation, moving the dpi minimum value check to functions.

Pick-to: 6.7
Change-Id: I242b18fafab1b6283a46bda8b59e87adf50e5c0b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-02-22 14:57:33 +02:00
Petri Virkkunen 14851471ee Do not register focus listener for null view in QtEmbeddedDelegate
A null view can not be focused.

Pick-to: 6.7
Change-Id: I0564dd554a304e2e60e3ae83c4782ac348edcd9b
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2024-02-22 14:37:42 +02:00
Rym Bouabid 3275050df4 QStorageInfo: Use new comparison helper macros
Replace operator==() and operator!=() private friends with
comparesEqual().

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Use new \compares command in the documentation to describe the
comparison operators provided by QStorageInfo.

Task-number: QTBUG-120303
Change-Id: I6434dc8382f6554b9e60840bac4abaeb95b70db6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-22 13:37:42 +01:00
Rym Bouabid 22ebe86f15 QProcessEnvironment: Use new comparison helper macros
QProcessEnvironment had operator==() and operator!=() defined as public
member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to
get rid of these methods and replace them with a hidden friend.

Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests.

Use new \compares command in the documentation to describe the
comparison operators provided by QProcessEnvironment.

Task-number: QTBUG-120303
Change-Id: I4c57f6cfb9589e82a37eea6993e079212b34cecd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-22 13:37:41 +01:00
Leena Miettinen 14b0580482 Doc: Remove formatting from \QA, \QD, and \QL macros
We don't format other product names, either.

Moved all product name macros to a separate section and
sorted them in alphabetic order.

Change-Id: I84cfd5a350b6e523e05371b809a49146b1c50769
Reviewed-by: Inkamari Harjula <inkamari.harjula@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Esa Törmänen <esa.tormanen@qt.io>
2024-02-22 12:24:20 +01:00
Marc Mutz 05f9996bbf QDBusUtil::isValidBusName(): remove an impossible condition guard
QStringView::split() only returns an empty container if a) the haystack
is empty and b) SkipEmptyParts is in effect.

Neither is the case here: We use the implicit default of KeepEmptyParts,
and we've already checked that the haystack isn't empty in the first
line of the function.

So the result of split() can never be empty here. Remove the check to
avoid confusing more readers than just yours truly.

Amends the start of the public history.

Pick-to: 6.7 6.6 6.5
Change-Id: I423e747ae4de0708d063a6bb2befd625dbd5c591
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-22 07:16:53 +01:00
Rym Bouabid 364e1c5f30 QFileInfo and QDir: use new \compares command
... to describe the comparison operators provided by these classes.

Task-number: QTBUG-120303
Change-Id: I611a1801eb038586bfe57be9b502b6f17f3d5742
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-21 20:28:34 +01:00
Jøger Hansegård 751ca5e5bd Assert if CoUninitialize is called on wrong thread
Every call to CoInitialize on a thread must be paired up with a call to
CoUninitialized on that same thread. QComHelper helps ensuring this, but
if an object using QComHelper is not created and destroyed on the same
thread, we end up in loosing this pairing.

This patch helps detecting such issues.

Task-number: QTBUG-121495
Change-Id: I07984437d1515d7ef61820d7152c339924b36e4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-21 19:19:26 +01:00
Joerg Bornemann 974d791f36 CMake: Default QT_I18N_SOURCE_LANGUAGE to "en"
Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I36c76211529e685aa1c85a7fb1b15667ad479185
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-21 18:21:42 +01:00
Joerg Bornemann 1d55864607 Doc: Link to qt_add_translations from qt_standard_project_setup
Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I88e95eace2f6d387cf03aa42394e90231d0f9a9c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-21 18:21:41 +01:00
Joerg Bornemann b387a6cd8a CMake: Rename I18N_*LANGUAGES variables and parameters
...according to the Qt 6.7 CMake API review.

Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I42012e346325ff05d63fa4dac44276eef15320fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-21 18:21:41 +01:00
André Klitzing f926ccbf64 Add newline after import
This avoids -Wnewline-eof for clang compilers.

error: no newline at end of file [-Werror,-Wnewline-eof]
    Q_IMPORT_PLUGIN(Governikus_AnimationsPlugin)

Pick-to: 6.7 6.6 6.5
Change-Id: I8de21f1f27cd177211ebf70fac0e01292cfa410c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-21 18:21:41 +01:00
Alexandru Croitor 9e9099865a CMake: Fix missing output of TEST_x86intrin_OUTPUT config test
When the intrinsics test failed, we never showed the failing build
output due to two reasons:
- TEST_x86intrin_OUTPUT was empty
- bracket arguments don't do variable expansion

Use the newly introduced feature in qt_config_compile_test to get
the output.
Replace the usage of a bracket argument with a concatenation of
regular strings.

Amends db342f42a4

Pick-to: 6.5 6.6 6.7
Task-number: QTBUG-122596
Change-Id: I7cdef9a145ac64c8fced8add4879fa19b8bcd19d
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-21 18:21:41 +01:00
Alexandru Croitor 3334a77ecf CMake: Teach qt_config_compile_test to set the build output
The qt_config_compile_test command now assigns the build output of a
config test to the TEST_${name}_OUTPUT variable in the callers scope.

We can use this to show error messages, and it can also be seen in
trace files for better troubleshooting.

It works for all project based calls with CMake 3.16, but for source
code based tests, due to the usage of check_cxx_source_compiles instead
of try_compile, it will only work for CMake 3.23+.

Pick-to: 6.5 6.6 6.7
Task-number: QTBUG-122596
Change-Id: Ib9664c158ba9a391bd17bf30a28f9a34eba991d5
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-21 18:21:41 +01:00
Volker Hilsheimer dfdb7a0430 Iconbrowser test: use the variable font on Android
It's the font with the highest priority in the engine, and allows us to
test variants by setting a variable axis.

Change-Id: I44bd3a63eef8d6cb999eaa372c29abbf445f401b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-02-21 18:03:30 +01:00
Volker Hilsheimer b5a0db53b5 QIcon: complete the documentation of ThemeIcons
Add missing \since 6.7, and document the purpose of each value based
on the description in the freedesktop specification.

Pick-to: 6.7
Change-Id: Id88438abf152c317600454d7137a19b13aa0a3cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-02-21 18:03:30 +01:00
Volker Hilsheimer 0de09beee5 QIcon: remove unmapped ThemeIcon enum values
The ThemeIcon enum provides symbolic names of icons for which most
engines provide an icon. We couldn't find a matching icon for several of
the XDG icon names, so remove those enum values for which we don't have
at least two matches.

Also remove names that are too specific for a desktop environment,
like icons for certain applications or system-wide actions.

Pick-to: 6.7
Change-Id: I5a6c74256bda66d9fde7513f834a8361858605c4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-02-21 18:03:30 +01:00
Mårten Nordheim 2f1a564e15 QHttp2Connection: add extra docs
And move a public slot into private slot, because it was not intended to
be public.

Change-Id: I847fa510c29e5f63aaace0797c81b9874007fda0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-21 18:03:29 +01:00
Marc Mutz 7285fea9f3 QMime: remove unused qmap.h includes
These TUs never seem to never have used QMap, QMultiMap or
QVariantMap, so remove the superfluous includes.

Amends ffa5820fa3.

Pick-to: 6.7 6.6 6.5
Change-Id: I3381fced294d7b99d3553d0efde38f20f01e4e97
Reviewed-by: David Faure <david.faure@kdab.com>
2024-02-21 16:53:31 +01:00
Marc Mutz 0be4e195fd [docs] QDBusUtil: remove documentation of bygone functions
The referenced QString overloads were removed when
6bbfae9457 ported from
QString/QStringRef overload sets to single QStringView functions.

Remove the docs.

Amends 6bbfae9457.

Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I766ad104f83aa19d90eeefe5b67524184869640a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-21 16:53:31 +01:00
Topi Reinio e858e86c9f Doc: Move OpenGL examples to '3D' category
Pick-to: 6.7
Task-number: QTBUG-122377
Change-Id: Id4c765c128ad2e90cacfffaa3f798bad349e71e8
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-21 14:04:50 +00:00
Lorn Potter 87738e8b81 wasm: update Emscripten to 3.1.50
Pick-to: 6.7
Change-Id: Id147a927420a1743ef1cfd952b36e90ac0c319dd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-02-21 12:30:01 +00:00
Alexandru Croitor 9fe6190b5b CMake: Fix wasm build without PCH enabled
There were a few missing includes.

Pick-to: 6.7
Change-Id: I352f4745a2691e96160408ab234a1ed8549f063c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-02-20 23:19:21 +01:00
Volker Hilsheimer 8a19f3c089 Apple icon engine: maintain aspect ratio of image
Don't return fixed square icon sizes from availableSizes(), respect the
aspect ratio of the input image we get from the system, and return an
actualSize() that fits into the requested size, but uses the image's
aspect ratio as well.

Reuse the calculation in the rendering code.

Amends 5b993fa8ed.

Fixes: QTBUG-121764
Pick-to: 6.7
Change-Id: I672b90a1fbecb662fd6614dcfa5090e28b16f3c8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-02-20 23:08:01 +01:00
Tor Arne Vestbø 02dbabdc70 Remove unused method QPlatformBackingStore::rhiSwapChain()
Pick-to: 6.7
Change-Id: I8fa8a0789d382ffb3e77ff79ac507d857442cbf4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-20 22:25:54 +01:00
Lorn Potter ee25bde3ed wasm: make opengles3 (webgl2) default surface format
All major browsers support webgl2 out of the box.
[ChangeLog][WebAssmebly] Default OpenGL ES version raised to 3.0

Fixes: QTBUG-110686
Pick-to: 6.7
Change-Id: I875b55c2e0f6e955249f121d92214cf10ed416d7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-21 04:23:32 +10:00
Lucie Gérard 08b8f9dd2f Correct license
According to QUIP-18 [1], all build system files
should be BSD-3-Clause.
The files in this patch are part of the build system.

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I9a79fb04971b117515ed16b3978435ad8ef0e31f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-02-20 17:44:22 +01:00
Morten Sørvig 83bfd368b3 wasm: add local font loading manual test
This tests allows configuring font loading options from
the test web page.

Change-Id: I15d850addb38329423722d1763ace8836dca2484
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-02-20 17:44:21 +01:00
Alexey Edelev bb68cc5844 Remove QT_ANDROID_DEPLOY_RELEASE variable
We assume that we can remove the variable handling and replace with the
warning, since variable was never out from TP.

Pick-to: 6.7
Task-number: QTBUG-121706
Change-Id: Iee29c0b5327d62cd3d7e77419e14e555fadcec2c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-20 17:25:25 +01:00
Morten Sørvig 3424234579 wasm: make preload_qml_imports take a source path
This was running qmlimportscanner on ".", which in some
cases would recurse down the qt/ symlink in the app
build directory (used with dynamic linking on wasm),
and find all of the imports from the Qt installation.

Make it take a path instead. Users can then provide
a path to the QML sources which will be passed to
qmlimportscanner

Change-Id: Ib5175e5dc1d26875c42f5a3e286314b7d602c9fe

Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-20 17:25:25 +01:00
Ivan Solovev 4281495f52 qfloat16: use new \compares command
... to describe the comparison operators provided by this class.

Task-number: QTBUG-119433
Pick-to: 6.7
Change-Id: Ifde49fb60aa50b733a35aa01c7a031b82fb06836
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-20 16:42:15 +01:00
Ivan Solovev e766a33834 Date and Time classes: use new \compares command
... to describe the comparison operators provided by these classes.

Do not remove the existing documentation of individual operators for
now, because the new commands do not contain any links to explain what
do the types of ordering actually mean.

Task-number: QTBUG-119433
Pick-to: 6.7
Change-Id: I663b992377ea8b00ffa0c0a64da0733e3772d1dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-20 16:42:15 +01:00
Giuseppe D'Angelo b4c90582a2 Mark the REST enablers as Tech Preview
Change-Id: Ie49a447f0f885290d43a7e4ecb0e0754df0da3e3
Pick-to: 6.7
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-20 16:27:20 +01:00
Giuseppe D'Angelo 3823e310e3 QDataStream: reimplement and constrain operator<<(bool)
Instead of offering it as a plain overload, make it a template
and constrain the argument to be precisely bool. This removes the
danger of accidentally streaming things that are convertible to bool,
such as pointers, by, indeed, converting them to bool.
This allows us to remove the deleted overloads for pointers to
objects and pointers to members.

The existing operator<<(bool) is exported, hence I moved it into
removed_api.cpp. Since the implementation required private
QDataStream APIs, I've just "inlined" the implementation that
simply routed through the operator<<(qint8) overload.

Change-Id: I3c0a9811bf5c9e734e28514b37bcaaddb09ada25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-20 16:27:20 +01:00