Commit Graph

63448 Commits

Author SHA1 Message Date
Marc Mutz
5c8910adfd moc: make qHash(SubArray) accept a seed
This prevents the use of the one-arg-to-two-arg adapter template which
we'd remove rather sooner than later, because it's causing all sorts of
problems, but probably can't, until Qt 7.

Pick-to: 6.6
Task-number: QTBUG-116074
Change-Id: I5907da0dc8c01b636d16dcc01e9c808ab9a85081
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-09-20 20:36:32 +02:00
Rym Bouabid
badb0818f5 Revamp Local Fortune Client Example: Create QString instead of char *
Create QString at compile time using the literal operator""s instead of
using pointer to characters. This way, no conversion or allocation will
occur at runtime.

Task-number: QTBUG-117036
Pick-to: 6.6 6.5
Change-Id: I9942ef8efa38de9ac5975799249a65fcb4c966c9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-20 20:36:31 +02:00
Rym Bouabid
b83736be05 Revamp Local Fortune Client Example: Fix include order
Fix include order to respect the Coding Conventions.

Include individual headers instead of "generic" headers.

Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that
should not be used in the examples.

Task-number: QTBUG-117036
Pick-to: 6.6 6.5
Change-Id: I33f9c54098824bfcfacac7c2f624554e105a291a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-20 20:36:31 +02:00
Topi Reinio
fedb1f5b76 Doc: Document QtTypeTraits header
There were multiple documented functions with \relates <QtTypeTraits>,
but the header file itself was not documented. QDoc still created a
proxy page for the header, but the information on it was incomplete;
for example, deprecated functions were omitted.

Pick-to: 6.5 6.6
Fixes: QTBUG-116349
Change-Id: Ic4334a43f72bb8a358cee7537a282495e4a046c6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-20 15:53:15 +00:00
Øystein Heskestad
13f673939d Fix renamed and duplicated namespaces in QXmlStreamWriter
The XML stream writer previously added namespace declarations with the
same URL as existing ones, but new names, and renamed the XML elements
to use the new namespaces instead of the existing ones.

[ChangeLog] Fix renamed and duplicated namespaces in QXmlStreamWriter.

Pick-to: 6.5 6.6
Fixes: QTBUG-75456
Change-Id: I90706e067ac9991e9e6cd79ccb2373e4c6210b7b
Done-With: Philip Allgaier <philip.allgaier@bpcompass.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-20 17:16:29 +02:00
Giuseppe D'Angelo
9d029939fb qobject_cast: add a couple of static_asserts
... for better error reporting.

Change-Id: I11afdef41f729b4357b743a3238c1f055a1d35d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-09-20 17:16:29 +02:00
Alexandru Croitor
d3c6d40d5d CMake: Handle subdirectory test data installation
The qt_install() calls in qt_internal_add_test() did not re-create
subdirectories that are part of the input test data.

Make sure that the subdirectories are created upon installation by
ensuring we specify a relative installation path that includes all the
path parts except for the file name.
That works the same for directories.

Amends ec1546afc4
Amends 540bd6cf20
Amends 1307736c7d
Amends 0a1256a52d

Task-number: QTBUG-117098
Change-Id: Ia80f4e7e1ec531264864bcde3ac192ce79b65746
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-20 17:16:28 +02:00
Volker Hilsheimer
1d89f6602a JNI: Don't explicitly specify deducible template arguments
Minor cleanup that enables us to change the actual type in some of the
wrapper functions, so that we can implicitly convert a QString to a
jstring.

Change-Id: I2acc99c656231b302269fae439cf3dd49278f09a
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-09-20 17:16:28 +02:00
Volker Hilsheimer
d2f950e88f JNI: fix isObjectType trait function
Java arrays are always objects, also if they don't contain objects.

Pick-to: 6.6
Change-Id: I376c9cc39445d7d9aaac093e4cd6995c8322ed0d
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
2023-09-20 17:16:28 +02:00
Volker Hilsheimer
1de8cb8f91 JNI: move JNI type macros into separate header
This removes the dependency from QJniObject to QtJniTypes, and allows us
to add more useful helpers to types declared through the macros, as we
can rely on QJniObject being fully declared.

Note: this is all undocumented API, so fine to change even though it
currently lives in a public header.

Change-Id: I07478ecb80ae166d619a09aed6820f680afed31b
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-09-20 17:16:28 +02:00
Volker Hilsheimer
7a27609d73 JNI: replace static_assert mandates with enable_if constraints
A function not being available if the parameter list doesn't meet the
requirements results in much better error messages than a function not
compiling (somewhere deep in the call tree, potentially) because of it.

Change-Id: If2c320736083a385232cc72f608bc4d61025627c
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
2023-09-20 17:16:28 +02:00
Marc Mutz
10d915277e tst_QStringBuilder: update the warning re:includes in stringbuilder.cpp
Not only are we subject to Q and P defines, we're also included in the
unnamed namespace now.

Amends df030e06a8.

Pick-to: 6.6
Change-Id: Ie2f4c9f45d9845d8a26140e0e1214e87b615ff02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-20 17:16:28 +02:00
Hatem ElKharashy
8dee03500e Add Manual test for Graphics Frame Capture
Simple window with a rotating rectangle that can be
captured using QGraphicsFrameCapture.

Task-number: QTBUG-116146
Change-Id: Ia3b6928e469d926c53260ee40ed5af97dd280c08
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-09-20 10:51:55 +03:00
Thiago Macieira
e456232ad3 CMake/ELF: replace 'extern "C++"' with exhaustive mangled expansions
Commit 946f15efb7 added the line
  extern "C++" { std::* };
but that was too good to be true. The intention was to catch Standard
Library inline symbols that got emitted in our own libraries, not use of
Standard Library types in our symbols. Unfortunately, that glob
expression matches the demangling literally and return types for
templates are demangled in their usual position to the left of the
function name.

For example,
  std::random_device qFoo();    // mangles as _Z4qFoov → "qFoo()"
but
  template <typename T> T qFoo();
  template std::random_device qFoo<std::random_device>();
mangles as _Z4qFooISt13random_deviceET_v and that demangles to
"std::random_device qFoo<std::random_device>()".

Therefore, we replace that with a full expansion according to the
mangling scheme. This includes a minor fix for the RTTI symbols, to
match nested names too (those with "N" in the name). It can't match
virtual override thunks ("Tv" and "Th"), because those have variable
length names and the matching is done by fnmatch(), not regex.

Pick-to: 6.6
Change-Id: I9d43e5b91eb142d6945cfffd178449cf68669cb6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-19 17:13:56 -07:00
Giuseppe D'Angelo
4a6cbfbe5c QVariant: add fromMetaType
The QVariant(QMetaType) constructor is a major anti-pattern: unlike
*every* other QVariant's constructor, it doesn't build a QVariant
holding the QMetaType object, but a QVariant of the specified type.

Introduce a named constructor for this use case instead.

In principle, this should lead to a deprecation of the QMetaType
constructor... except that it's used everywhere, so I can't do it at
this time.

Drive-by, improve the documentation of the QVariant(QMetaType)
constructor (since it's basically c&p for the new fromMetaType
function).

[ChangeLog][QtCore][QVariant] Added the QVariant::fromMetaType named
constructor, that builds a QVariant of a given QMetaType.

Change-Id: I4a499526bd0fe98eed0c1a3e91bcfc21efa9e352
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-09-20 00:05:53 +02:00
Marc Mutz
41824a02cb QStaticLatin1StringMatcher: fix typo in static_assert
The class name was wrong.

Task-number: QTBUG-100236
Change-Id: I0ffd163bf59682d8326feefb76a4cd8b7e106105
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-20 00:05:53 +02:00
Volker Hilsheimer
7f4cdb9941 JNI: replace TYPE declarations with CLASS declarations
That we have two macros to declare a C++ type to represent a Java class
is confusing. The TYPE macro as of now allows us to declare array types,
but with QJniArray we won't need that anymore, and can just use Class[]
as the type instead. Changing that will be a follow-up commit; for now,
get rid of TYPE-usages to declare regular classes.

Change-Id: Iea0a9548772ca701148442412cf6ad567583213f
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-20 00:05:39 +02:00
Volker Hilsheimer
ece7b9430d JNI: Explicitly convert QtJniType instances to jobject for variadic arguments
When calling the (old and outdated) variadic argument overloads of
callMethod (as opposed to the variadic template overloads), then we
cannot pass complex types.

That types declared via the Q_DECLARE_JNI_CLASS macro are trivial was an
implementation detail that we shouldn't rely on as long as those types
are not part of the public API. Cast explicitly to jobject so that we
can make those types proper QJniObjects.

Updating this code to use the new variadic template overloads is for a
follow-up commit.

Change-Id: Ia9d610c84de6f989ef957c23401b1cbc64d2d1ef
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-20 00:05:39 +02:00
Volker Hilsheimer
9250481384 JNI: refactor code to use _v and _t helpers
As a drive-by, fix style by adding a whitespace after flow-control
keywords `if constexpr`.

Change-Id: I4e1153edc6f9ee903c7620772c12c411c33e90c6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
2023-09-20 00:05:39 +02:00
Joerg Bornemann
fe182c1541 CMake: Add I18N_LANGUAGES keyword to qt_standard_project_setup
[ChangeLog][CMake] Added variable QT_I18N_LANGUAGES to specify the
languages that are used for i18n in the project.

[ChangeLog][CMake] Added keyword I18N_LANGUAGES to
qt_standard_project_setup to conveniently set QT_I18N_LANGUAGES.

The call
  qt_standard_project_setup(I18N_LANGUAGES hi ho)
sets the variable QT_I18N_LANGUAGES.

The target finalizers use this variable to set up CFBundleLocalizations
on Apple platforms.

qt_add_translations will be extended to read QT_I18N_LANGUAGES as well
to determine the names of .ts files if TS_FILES is not given.

Fixes: QTBUG-116716
Change-Id: I76f0753d10efb9c32947d9239e43382c9d85eb51
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-09-19 18:53:29 +02:00
Wladimir Leuschner
e5c136c179 Use correct parameters to query highcontrastmode on Windows
Task-number: QTBUG-113645
Change-Id: Ib400253a5589345648025c22c1487598cbefbd23
Pick-to: 6.6 6.5
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2023-09-19 18:24:56 +02:00
Laszlo Agocs
d656f7405e Backing store compositor: Use smart pointers for some QRhi resources
Pick-to: 6.6 6.5
Change-Id: I005b2efe23c7dda0b15d2156708055f3b96681fc
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-09-19 17:16:25 +02:00
Laszlo Agocs
54816a8f9a Sync rhi backingstore d3d12 behavior with Quick
When adding the D3D12 code path in widgets it seems it was ignored that
the retry-with-WARP logic was present both for D3D11 and 12 in Qt Quick.

For consistency, the same logic must be used. Right now widgets only has
the retry logic for D3D11.

Pick-to: 6.6
Change-Id: I08d5728acfb9a68db7e0a4b0477050f08546ffac
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-09-19 17:16:25 +02:00
Piotr Wierciński
08d642ed4e wasm tests: Restore killing browser after each test
Revert incidental change which leaked from dev environment.
It's better to save CI resources by only having one tab
opened in browser at a given time.

Change-Id: I7f8d1af546b749b2fec4f49a6751545f52c16414
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-09-19 15:03:46 +02:00
Marc Mutz
0f19cafc3c [docs] Fix \since for qHash(qfloat16)
The patch adding the function unexpectedly made it into 6.5 before
6.5.3 was forked off. That's nice, as it reduces the number of
releases with a broken implementation, but the documentation and
ChangeLog were written assuming a merge for 6.5.4.

Fix the documentation.

Amends 6da6a17de9.

[ChangeLog][Editorial][QtCore] Delete the old entry for
qHash(qfloat16), keep the one from this commit.

[ChangeLog][QtCore] Fixed qHash(qfloat16) which was broken from 6.5.0
to 6.5.2, inclusive. If you compiled against one of the affected Qt
versions, you need to recompile against either Qt 6.4 or earlier or
6.5.3 or later, because the problematic code is inline.

Pick-to: 6.6 6.6.0 6.5 6.5.3
Task-number: QTBUG-116064
Task-number: QTBUG-116076
Change-Id: If8fa35fb8532cf0bbf2ba0438694d95fd9bd6991
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-19 15:03:46 +02:00
Eskil Abrahamsen Blomfeldt
08134e458d Upgrade Harfbuzz to version 8.2.0
Task-number: QTBUG-117136
Pick-to: 5.15 6.2 6.5 6.5.3 6.6 6.6.0
Change-Id: I910c8bff2fe521aa02929b9000fa7f38192d1a51
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-19 12:52:48 +00:00
Antti Määttä
720bb62f5c CTF: Fix channel naming
This was erroniously removed in a previous change.

Pick-to: 6.6 6.5
Change-Id: Ia62327bea7e3d190503a0eb05217c0f780f4fe9a
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2023-09-19 15:45:05 +03:00
Samuli Piippo
15fb832b43 QStorageInfo/Linux: add missing include
Amend 543ae6e6a4 and add include
for dev_t. Needed with MUSL.

Change-Id: Ie7a2ac902af6d34307bf7856619eb9617bf3307f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-09-19 05:46:00 +00:00
Shawn Rutledge
300614a170 Fix gcc 13 fatal warning: emplace_back() rather than append()
Fixes: QTBUG-116763
Pick-to: 6.6
Change-Id: Ie7c897deb14fcd1ff27277892f0c5a151ff63b41
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-09-19 01:06:12 +02:00
Anton Kudryavtsev
60d6051490 androidjnimain: use rvalue overloads more
Change-Id: Ib4f5bccbf4f384248e2651492337ff5e227adce1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-19 01:29:25 +03:00
Anton Kudryavtsev
fd7a7e2684 qcommonstyle: use rvalue overloads more
Change-Id: I39bd163ac8203095bbf93a0ada25a179d6bda48c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-19 01:29:25 +03:00
Anton Kudryavtsev
d1792b1bbe qdistancefiled: use rvalue overloads more
Change-Id: I8c665e6814967f3a0463cbad8686ca28d55ab124
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-19 01:29:25 +03:00
Anton Kudryavtsev
322ec07d0e qpaintengine: use rvalue overload more
Change-Id: I13c13f9cb043bb639160ac19fa88daefde0cbff1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-19 01:29:25 +03:00
Anton Kudryavtsev
81a41ac0a7 qpixmapfilter: use rvalue overloads more
Change-Id: I94f641b9d8405d607b54bfae0fe1b0bb914f31b4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-19 01:29:25 +03:00
Anton Kudryavtsev
2b50d01611 qplatformpixmap: use rvalue overloads more
Change-Id: Ie5b6f6d6ffbcc0bca7a1464ad2eadbf47a707abb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-19 01:29:25 +03:00
Friedemann Kleint
62eaaeb4f5 hellogl2 example: Decouple mainwindow from window
The circular dependency cannot be ported to the corresponding Python
example.

Task-number: PYSIDE-2206
Pick-to: 6.6 6.5
Change-Id: I031b3fffdd7bd677d2fc55e132975a65f66ad128
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-18 22:45:36 +02:00
Friedemann Kleint
6f8398c8eb hellogl2 example: Streamline code
- Shorten menu code, add keyboard shortcuts and a quit action.
- Avoid calls to setLayout().
- Pass a parent to message boxes.
- Use the current screen for size calculation and consider
  availableGeometry().
- Prevent closing by the Escape key in docked mode.
- Split the dockUndock() function into dock()/undock() for clarity

Pick-to: 6.6 6.5
Change-Id: I007da3bff86ee3f2dc8f87379e5d2ba2f0f6f3d7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-18 22:45:36 +02:00
Eskil Abrahamsen Blomfeldt
5641a5e1e5 Upgrade to Freetype 2.13.2
Task-number: QTBUG-117135
Pick-to: 5.15 6.2 6.5 6.5.3 6.6 6.6.0
Change-Id: I2485cf286f590eccee9c4be4bb19559631288fd5
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-09-18 20:26:55 +00:00
Laszlo Agocs
ffb857e9d0 Sync rhi backingstore prefer-software env.var with Quick
Behaving differently in QQuickWindow vs. a QRhi-based widget
window is not great for WebEngine. The env.var naming is not
the best (QSG prefix) but we already have some precedent for
this (recognizing QSG_INFO in QRhi), and there is no other
choice anyway.

Pick-to: 6.6 6.5 6.6.0 6.5.3
Task-number: QTBUG-116445
Change-Id: Ibfd495cbd1d42502441d6629325bdeb033e813f3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-18 20:26:22 +00:00
Ilya Fedin
12d6fc5229 xcb_egl: Prefer eglCreatePlatformWindowSurfaceEXT to eglCreateWindowSurface
Change-Id: I32de5b241cce786318434e7653ff979cf8e82f0e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-19 00:13:30 +04:00
Axel Spoerl
6f5136ef66 QMessageBox::about / aboutQt - use native modal dialog on iOS
The about / aboutQt statics in QMessageBox used a non-native, non-modal
dialog box on all operating systems. This creates a grid layout with
labels for heading, text and icon.

This has two unwanted side-effects on iOS:
- When the screen size is not sufficient to display all text, the text
is not rendered. On an iPhone SE for example, only the Qt icon is visible.
- When the screen height exceeds the minimum requirement, the informative
text is bottom-aligned.

=> Show about(Qt) message boxes in a modal, native dialog.
=> Update documentation.

This partly reverts aafed07dee.

[ChangeLog][iOS] QMessageBox::about(Qt) now shows native, modal dialog.

Fixes: QTBUG-115832
Pick-to: 6.6 6.5 6.2
Change-Id: I4cfbce416e7d2717058bef9a050a85d424b8a03d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-18 18:24:37 +02:00
Ivan Solovev
ab9f5a9a0b QAbstractAnimation: avoid spurious dependencies on the state property
The state property is read-only, meaning that it can only be modified
from the class internals. At the same time, the public start(), stop(),
pause(), and resume() methods, as well as a private setState() method
can be called from other property setters, thus creating an unwanted
dependency on state.

Fix it by using valueBypassingBindings() when reading the state.

Task-number: QTBUG-116346
Pick-to: 6.6 6.5
Change-Id: I404cd2141ea52b8ffed5edbb4261a535cd329ec2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-18 18:24:37 +02:00
Andy Shaw
4583d808ea SQLite: Update SQLite to v3.43.1
[ChangeLog][Third-Party Code] Updated SQLite to v3.43.1

Pick-to: 5.15 6.2 6.5 6.6 6.6.0
Fixes: QTBUG-117139
Change-Id: Id4f7d55adb317f009613245510c4eb26678ddc7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-18 15:10:22 +00:00
Allan Sandfeld Jensen
cb42c94078 Compress UpdateLater events
Handle UpdateLater events in QApplication::compressEvents

Pick-to: 6.6
Change-Id: I0c63f88d8ed90fc56c093c534394461797d1336b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-18 15:50:43 +02:00
Ievgenii Meshcheriakov
178a5d15ef QDBusConnectionPrivate: Protect access to serverConnectionNames with mutex
This list is accessed by ~QDBusServerConnection in a user thead.

Task-number: QTBUG-116621
Change-Id: Ic115612b2a0f12fd9f69f38f4662dc36fffbf178
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-18 15:50:43 +02:00
Ievgenii Meshcheriakov
eacff46af4 QtDBus: Check if QDBusServer is destroyed before accessing it
Also lock before accessing serverObject member, it is cleared
by ~QDBusServer().

Task-number: QTBUG-116621
Change-Id: I14c96e34316a46fe43ecd929e44cd1800ba8b803
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-18 15:50:43 +02:00
Thiago Macieira
2156778184 QOperatingSystemVersion: Move the new OSes into a non-exported class
The solution from commit 3446313c7a didn't
work completely as expected. That commit the QOperatingSystemVersionBase
base class so we could add new static constexpr inline variables to
QOperatingSystemVersion in patch releases. We need a different base
class because you can't have constexpr variables of incomplete types and
the the type isn't complete inside its definition.

However, QOperatingSystemVersion is an exported class and there's an
unexpected interaction between __declspec(dllexport) / dllimport and
inline variables: they're imported from the DLL that exported them. For
Qt 7 we can remove this class's export, but not until then.

This commit adds to the fix by introducing a middle base class, so we
can add the static constexpr inline variables.

Pick-to: 6.6 6.6.0
Change-Id: Ifa1111900d6945ea8e05fffd177e0b696209c7af
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-18 12:58:26 +00:00
Vladimir Belyavsky
6b4cc9bf73 QNetworkConnectionEvents: fix potential nullptr access
Fix potential nullptr access in
QNetworkConnectionEvents::getNetworkConnectionFromAdapterGuid().
This can happen if for some reason the NetworkListManager instance
failed to be instantiated in QNetworkConnectionEvents constructor.

Fixes: QTBUG-117097
Pick-to: 6.6 6.5
Change-Id: If51ea383e22461a6c3124576c4e1be3f30dde1f6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-09-18 12:21:44 +00:00
Anton Kudryavtsev
1e25bf5f4d platforms/windows: use qimage rvalue overloads more
Change-Id: If827f0daa5036dbc9855c0209ec0621a9e8bf78e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-18 10:14:33 +03:00
Anton Kudryavtsev
0ed8db7800 QString::toHtmlEscaped: avoid unconditional copy
Let's find replaceable chars and then do copy

Change-Id: I2d365626218b0daf2023144dee7e901e8e99adc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-18 10:14:22 +03:00