Commit Graph

59861 Commits

Author SHA1 Message Date
Jörg Bornemann
f00dbe1035 Revert "Revert "coin: Build qmake examples in non-qtbase repos""
This reverts commit 0f5af511ea.

Reason for revert: Examples build locally with qmake.

Task-number: QTBUG-109383
Change-Id: Ief37cda919c32f8a6275ed7d8a5f1d38dc1b9ed9
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-16 18:18:28 +00:00
Tasuku Suzuki
ce1506355f Fix build with -no-feature-cssparser
Pick-to: 6.5
Change-Id: I146ac61f92acdcd22c46ca27a1fca48c47817e3c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-17 03:18:28 +09:00
Kai Köhne
0d596bf53d Doc: Move documentation for QAI::selectionInterface to source file
qdoc doesn't allow documentation in headers.

Pick-to: 6.5
Change-Id: I25686572aa15395bb3eb94dd637e4674e7310afe
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-16 16:27:19 +01:00
Mikolaj Boc
cb20cbd3c8 Make qt cmake functions react properly to batch dummy targets
Stub targets introduced in 65b7aacb make the old batch target detecting
measure in qt_internal_extend_target,
qt_internal_undefine_global_definition, qt_internal_add_resource
obsolete, since now the targets actually exist in the build system.
Unconditionally fail if the target does not exist and if it does, query
for its inclusion in the batch

Change-Id: I1cd1d8cc7fbf4bdbd2289a1b38ecbea1e93a06c8
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-16 13:46:57 +01:00
Øystein Heskestad
fc3942114d Make const functions in QDir re-entrant by protecting mutable variables
QDir caches data in mutable variables. Because of no protection, two
threads calling for instance QDir::count on two independent but shared
copies of a QDir object caused a data race.

Running the tst_QDir_tree and tst_QDir_10000 three times with and
without this change show no change beyond the difference between
each result. For instance tst_QDir_tree::thousandFiles:"src" took
36/35/37 ms before the change and 35/35/35 ms after.

This makes sense because the time to handle mutexes is very little
compared the time to make file operations.

Fixes: QTBUG-105753
Change-Id: I6886f84521410f88cce2b25f0cce8cfc3fea1a0b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-16 13:17:42 +01:00
Øystein Heskestad
a5387f3c16 QDir: Refactor separate cache clearing functions into a single function
Task-number: QTBUG-105753
Change-Id: I7f3473ce21e71ccd04ff9f2575244167b5c3e3a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-16 13:17:42 +01:00
Joerg Bornemann
c146d25a87 CMake: Fix exposing sources with absolute path to IDE
_qt_internal_expose_deferred_files_to_ide must add the source files to
the target exactly as they were passed to
_qt_internal_expose_source_file_to_ide. Otherwise, CMake might be fooled
into thinking that we're adding a new file here, and source file
properties would not be readable.

Instead of back-calculating the relative paths from the absolute paths,
we use the already existing list of relative paths.

Pick-to: 6.5
Fixes: QTBUG-109678
Change-Id: I81510f37eacb409eb5c03e3ff032926c3ca25a1f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-16 12:11:50 +01:00
Kai Köhne
9ae91ac318 Doc: Mark qRegisterTestCase as new in Qt 6.5
Also remove reference to QTestCaseEvent loop class, which
is not documented.

Pick-to: 6.5
Change-Id: Ic09b3b102db535dfb090b9a4072ad29515a911ae
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-01-16 08:38:52 +01:00
Tor Arne Vestbø
50218659a4 QStyleHints: Fix Q_PROPERTY declaration for keyboardAutoRepeatRateF
Pick-to: 6.5
Change-Id: I21d3280176d6c52daab0b3abfdafb404d42db9d0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-14 07:48:14 +01:00
Friedemann Kleint
f5b1dbb8f6 QtWidgets: Disambiguate static functions/variables and defines
They cause clashes in CMake Unity (Jumbo) builds.
Properly prefixing the childWidgets() function also prevents
it from cluttering static builds.

Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Idd2b1ec748f33cfae8f3213847c43b3fb0550377
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-14 00:20:34 +01:00
Marc Mutz
ce104cac50 QPermission: replace T data<T>() with std::optional<T> value<T>()
As discussed in API review, the default-constructed T() returned from
a mismatched data<T>() call is indistinguishable from a real T with
default state.

To make them distinguishable, return optional<T>. Call the new
function value<T>(), mimicking QVariant::value<T>(), and suggested in
API review, because data() is usually used to return raw pointers, not
values.

Remove the qWarning() on requestedType and actualType mismatch, as the
new function can be used in std::get_if/dynamic_cast-like if-then-else
chains, in which failure is part of the normal operation, and a
warning message misplaced:

  if (auto loc = perm.value<QLocationPermission>())
     ~~~ use *loc ~~~
  else if (auto con = perm.value<QContactsPermission>())
     ~~~ use *con ~~~
  ~~~ etc ~~~

Pick-to: 6.5
Change-Id: I799a58e930307323ebce8f9ac50a42455e9c017f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-13 21:07:18 +01:00
Mårten Nordheim
36619181fb Move QMetaMethod ctor back into a private section
Its symbol changed once it was changed to protected, so even if
it's unlikely to have been imported in any application let's just
change it back to private.

Pick-to: 6.5
Change-Id: I21b4a471caedb8edc8e1a04f706eae541b3c12fd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-13 21:07:18 +01:00
Mikolaj Boc
2e97ccc8d0 Add QString<->emscripten::val conversion functions
Following the QRect, add functions converting the QString to native
emscripten::val and back: fromJsString, toJsString

Change-Id: I2d0625ede3bbf7249e2e91b8de298b5b91df8ba2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-01-13 21:07:14 +01:00
Jan Arve Sæther
4dbb07f614 Don't use file dialog in the address book example
On small screen devices such as iPhone targets, the save file dialog is
using a non-native dialog, and it doesn't fit the screen real estate to
the extent that the [Ok] button is clipped away.

In addition, the open file dialog and the save file dialog doesn't
cooperate very well on platforms such as iOS without more plumbing.
Since using the file dialog is out of the scope for this example we
remove all usages of it.

Pick-to: 6.5
Change-Id: Ie165355ed0b671d93e44d2d55791156367b0ea5c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-01-13 19:21:44 +00:00
Ievgenii Meshcheriakov
19ca03c21c QUnicodeTools: Use thread-safe libthai API
Use th_brk_new()/th_brk_find_breaks() instead of non-thread-safe
th_brk(). The new API is available in libthai since version
0.1.25 released on 2016-06-28.

[ChangeLog][QtCore] Correct line wrapping of Thai text now requires
libthai version 0.1.25 or above.

Fixes: QTBUG-105544
Pick-to: 6.5
Change-Id: I723050bef9f4e6445c946125c74c99e50addadef
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-13 19:46:45 +01:00
Marc Mutz
8f8d8f71dd tst_QPermission: add more tests
The new test:

- checks the properties of stateful Q<Typed>Permissions work

- ensures that piping a Q<Typed>Permission through QPermission
  maintains state

- also ensures that assignment of a Q<Typed>Permission to a
  QPermission works (via QPermission(Type) + move ctor)

Pick-to: 6.5
Change-Id: I340e49b1ecc665702ccab26d9050ca158b0e7885
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-13 17:10:43 +00:00
Marc Mutz
7a1bf4c628 [doc] QCalendarPermission: fix cut'n'paste error
These docs are for Q_Calendar_Permission, not for QContactsPermission.

Pick-to: 6.5
Change-Id: Ifbffa568b510ef035270082d1926e35d8d5cf241
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-13 17:20:56 +01:00
Marc Mutz
3b0439379f QLocationPermission: make enums have explicit underlying type
They can be smaller than an int, so use quint8. In a world of BC
guarantees, pinning the underlying type of enums is best practice.

Found during API review.

Pick-to: 6.5
Change-Id: I0c31fe4565329982c81173e3a265f73758aad257
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-13 17:20:56 +01:00
Marc Mutz
595360506d QSqlRecord: add missing C++11 move SMFs
[ChangeLog][QtSql][QSqlRecord] Added move constructor, -assignment
operator, and swap().

Task-number: QTBUG-109938
Change-Id: I54f2666defbf56f5ba2faea6358722ebd7cac157
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-01-13 17:20:55 +01:00
Timur Pocheptsov
0cd153b268 QWidgetTextControl: deal with empty formats list properly
Do not call first on it. A regression was introduced by
56f0ebfe86.

Fixes: QTBUG-110070
Pick-to: 6.5 6.4
Change-Id: I7c969da889b6c7ad3a67149fe99ca47830683073
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-01-13 17:20:55 +01:00
Mikolaj Boc
ae3ffc1d4b Remove tst_QTextBoundaryFinder::thaiLineBreak
The test body has been inside an #if 0 for long, remove the test
altogether. The part that loads libthai does not check anyhing
meaningful.

Task-number: QTBUG-109954
Change-Id: I8ce006a14e4cf926b668e958d4b2343f965a5fb6
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-01-13 17:20:55 +01:00
Alexey Edelev
2bf54da75a Use the existing imported location for syncqt in developer builds
In developer builds we don't install tools, so syncqt executable is
located in its RUNTIME_OUTPUT_DIRECTORY but not by install path. This
works fine in general case, but in multi-config builds the
RUNTIME_OUTPUT_DIRECTORY path doesn't match the install path. So syncqt
target points to wrong location in this case. It makes sense to use the
existing IMPORTED_LOCATION of syncqt executable directly if Qt is not
supposed to be installed. Also check if the syncqt executable exists at
the expected location before creating the imported target.

Pick-to: 6.5
Fixes: QTBUG-109864
Change-Id: I0de647b2a73169a0d48bd88edeb7ff00975fa774
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-13 15:08:26 +01:00
Edward Welbourne
5e295382d7 Clear out some unused code in QStorageIterator::next() on Unix
The code to save parent_id, actually a member variable that's
commented out, presumably because we have no use for it, was declaring
a variable to save it in and then Q_UNUSED()ing it. It is simpler to
just not do any of that. Since this "code" did at least document where
to get the parent_id, if we ever do want it, and what the number just
parsed actually means, keep the assignment as a comment but make clear
why it's commented out.

Change-Id: Iec59fa4d1af6c7e3b16570a612178a54004ebb70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-13 15:08:25 +01:00
Edward Welbourne
25e10d9636 Give tst_QStorageInfo a QCOMPARE_op() makeover
It had various QVERIFY()s of != and >= checks: convert these to
QCOMPARE_NE() and QCOMPARE_GE() checks.

Change-Id: Ida6f7dca726187f7837da0d805549d9c582f946a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
2023-01-13 15:08:25 +01:00
Marc Mutz
6ac9d46a36 QPermission: don't hide SFINAE constraints
Like done elsewhere (e.g. in QStringView), formulate the constaint in
if_x<T> = true from, and let qdoc see it. Then document the constraint
in prose, too.

As a drive-by, use C++17 variable templates instead of
std::bool_value, and document that data() returns a
default-constructed T on failure (which is indistinguishable from a
successful call that happens to return a default-constructed T, so we
should probably return an optional<T> here, but that's orthogonal to
the change at hand).

Pick-to: 6.5
Change-Id: I0584ce3f4febd619d3966afeb6244b11b167cd42
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-13 14:38:17 +01:00
Marc Mutz
6623548104 QPermission: fight template bloat in data()
Extract the type-independent code into an out-of-line data_impl()
private method, leaving data() containing only the
QMetaType::fromType<T>() call as well as T copy- and
default-constructor calls.

As a drive-by, use categorized logging (consistency with the rest of
the permissions code) and printf-style qWarning() (expands to less
code).

Pick-to: 6.5
Change-Id: Ie23b83cb3fc537c9cff15f853ceee2888bf63124
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-01-13 14:38:17 +01:00
Volker Hilsheimer
c3a5fe2fd7 QFormLayout: don't access out-of-bounds layout data
When rows are hidden (implicitly or explicitly), then their layout data
does not get fully updated. If rows get hidden after the layout data has
been calculated once, then we must make sure that their indices are
reset. Otherwise we might access array indices that are out of bounds
when the layout data structure gets resized to fit only visible rows.

For good measure, skip entirely over hidden rows when accessing the
layout data when arranging the widget.

Fixes: QTBUG-109237
Pick-to: 6.5 6.4
Change-Id: I4d6943b6a110edb61f60ce78d31f0fc64b5cc03d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-01-13 14:38:16 +01:00
Alexey Edelev
4e4cd7416a Add the 'QT_INTERNAL_AVOID_OVERRIDING_SYNCQT_CONFIG' flag
The flag avoids overriding of the default CMake build config when
building syncqt.

Add extra checks to the make sure that configure-time tools use the
correct build type.

Fixes: QTBUG-109792
Pick-to: 6.5
Change-Id: I572fed60c58e59297fa559aea6eb86af94b979b7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-13 14:38:16 +01:00
Alexey Edelev
0e3ef41112 Set GenerateDebugInformation to true in vcproj if at least /DEBUG is set
If the command line option contains /DEBUG without the following
argument, GenerateDebugInformation remained 'false' because the
DebugInfoOption contained the initial value.

Set GenerateDebugInformation to 'true' if the /DEBUG option is found and
reset to 'false' only if option is set to 'none'.

Amends commit 6a6b27940d.

Pick-to: 6.2 6.4 6.5 5.15
Fixes: QTBUG-110068
Change-Id: I792d7335d8b9536d4beed54cabfd70dcf54f09ac
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-13 14:29:37 +01:00
Volker Hilsheimer
51272017a7 QCalendarWidget: Add reset functions for minimum/maximumDate
QDateTimeEdit has such reset functions for the minimum/maximum
range properties, this makes QCalendarWidget consistent with the
simpler editors.

Fixes: QTBUG-62448
Change-Id: Iabb89f599e4996f00488a885a5b8a009471838b3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-01-13 12:26:06 +01:00
Antti Määttä
e3458aac64 Add CTF tracing backend
Implement platform independent tracing backend in Common trace format.
This allows tracing in platforms without own/existing backend and
analysing all platforms with the same tooling. The backend is the basis
for further work in application level profiling area.

The backend is implemented as a plugin that is loaded immediately when
the application starts in order to process all trace events. The backend
avoids using Qt classes so that it doesn't generate trace events
itself. Adds plumbing to configure the new backend.

Modifies the tracegen and tracepointgen tools to support the new
backend.

Task-number: QTBUG-106399
Pick-to: 6.5
Change-Id: I80711be52d4d48e1acbc72edffbdf3f379fce52a
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2023-01-13 12:43:46 +02:00
Antti Määttä
a37a59eea8 Add tracing metadata to QEvent and QImageFormat
Modify qtcore and qtwidgets to use the new tracing metadata features.
This allows showing the event types and image formats used in traces
as text instead of just numbers.

Task-number: QTBUG-106399
Pick-to: 6.5
Change-Id: I267d03a696dc95e8b1d36657d7339dd09d92de3b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2023-01-13 12:43:45 +02:00
Antti Määttä
a2bcb7d8ad Add metadata support to tracegen and tracepointgen tools
Adds ability to add textual metadata for enumerations and flags
to the traces so that they provide more information to the user
instead of just numbers. Implement these for both existing backends.

Task-number: QTBUG-106399
Pick-to: 6.5
Change-Id: Ibab00dd370d019891cf9ad6e65e6f9d868e32dce
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2023-01-13 12:43:45 +02:00
Antti Määttä
bab65d70dc Add find package for lttng library so that it gets added to target
Add it globally so that each module using tracepoints don't have to
add it themselves to each modules configure.cmake.

Pick-to: 6.5
Change-Id: Id58cfaff5cd715b2667da2470001d646117f9f28
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-13 12:43:45 +02:00
Antti Määttä
9bdf74a4f2 Add tracepointgen tool and convert qtgui to use it
Allows automatically generating tracepoint files by scanning source
files for instrumentation macros.

This makes it easier to add tracepoint support to modules and also
ensures that the tracepoint files do not get out of sync with the
functions they are tracing.

Q_TRACE_INSTRUMENT generates entry/exit tracespoints for a function
it is set. Q_TRACE_PARAM_REPLACE is used to change a function parameter
for these functions to convert it to supported parameter type.
Q_TRACE_POINT can be used to create a standalone tracepoint.
Q_TRACE_PREFIX can be used to add prefix for generated tracing backend
for example to add includes for types used in the trace points..

Task-number: QTBUG-107238
Pick-to: 6.5
Change-Id: Ib395b80838434ceb72683dac0545ca20c4d09455
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2023-01-13 12:43:44 +02:00
Antti Määttä
f488c65721 Fix array handling in tracegen tool
Remove the array field type. We need to know the basic datatype as well
for future backends. Use the arrayLen instead. Add the missing array
handling for etw backend.

Task-number: QTBUG-106399
Pick-to: 6.5
Change-Id: I97c38240bd1c79c0e61d268a7d780016b341f110
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2023-01-13 12:43:44 +02:00
Friedemann Kleint
135a792940 QtOpenGL: Disambiguate class name QTextureBinder
It occurs twice, causing a clash in CMake Unity (Jumbo) builds.

Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: I39341af72cfa406d80c598a56db9e02f80c61a9b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2023-01-13 07:58:37 +01:00
Ulf Hermann
9615e7f9e5 Gui: Always declare qt_memfill{32|64} as function pointers on x86
Having the declaration of a function depend on compiler flags is a
fundamentally bad idea since you can compile different compilation units
that all include the header with different flags. This leads to
undefined symbols.

Pick-to: 6.5
Fixes: QTBUG-109159
Change-Id: I0aede280988e4f10c42d5b1824ad9c96a1e10854
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 20:54:22 +01:00
Jan Grulich
a48bbbaa50 QCryptographicHash: no need to store return values just to ignore them
There is no benefit from storing return value from some OpenSSL calls as
the only thing we do is to ignore them. There is also no difference when
we would be returning earlier.

Pick-to: 6.5
Change-Id: I76c742016a2532c65ffdcd913aafc74a2d1a9623
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-12 20:45:52 +01:00
Marc Mutz
def2a3de37 Move q20::remove_cvref to q20type_traits.h
The original is defined in <type_traits>, not <functional>.

Pick-to: 6.5
Change-Id: I596e56f64d2eed609ad2f7e6f03ae006afaa2fa9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 20:45:51 +01:00
Friedemann Kleint
c1e390f16c QtPrintSupport: Disambiguate static functions
They cause clashes in CMake Unity (Jumbo) builds.

Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: If3029d5b99499fd0e216fc080ade9842c2d11ea4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-01-12 20:16:28 +01:00
Ahmad Samir
56e42f1818 QNetworkDiskCache: optimize expire()
- Use a std::vector<struct> that has the needed info already cached
  (e.g. now size() isn't computed twice)
- Only sort the cache items if the size exceeds the cache limit and
  there are files to remove

Change-Id: I69a7a5d1afb26d156c4babddf6b357ec68d569d1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-12 21:16:27 +02:00
Mikolaj Boc
51b1a23aa1 Inline the resetSystemLocale function
It's used from three different tests so it can only have one
definition, but when batching it has three of them.

Task-number: QTBUG-109954
Change-Id: Idfddd313a1fe447968066118529527e3d4214823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 19:54:13 +01:00
Marc Mutz
26b227e128 QVarLengthArray: Extract Method growBy()
Separates the actual reallocation use-cases from the resizing ones
when calling reallocate_impl, in preparation for fixing QTBUG-109745.

Task-number: QTBUG-109745
Pick-to: 6.5 6.4
Change-Id: Iee0c3e56569ec7877beda8db3a645e2bbb6b4d4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 19:54:13 +01:00
Marc Mutz
7c5ff43ea3 QVarLengthArray::resize_impl: don't default argument, overload
Separates the resize(n) and resize(n, v) code paths in preparation for
fixing QTBUG-109745.

Task-number: QTBUG-109745
Pick-to: 6.5 6.4
Change-Id: I49808ce4dc2f1de0de6af120990b2e00edb47728
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 19:54:12 +01:00
Friedemann Kleint
d9d74723cc QtSql: Disambiguate typedefs
They cause clashes in CMake Unity (Jumbo) builds.

Task-number: QTBUG-109394
Pick-to: 6.5 6.4 6.2
Change-Id: I3f94044671cdbd0a1bb0964bf291e36508223b50
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2023-01-12 19:03:17 +01:00
Edward Welbourne
73e7ffb2fd Verify land-preservation in locale construction
For most territories, if we specify only that territory, we should get
a locale specific to that territory. There are exceptions for various
reasons, but check that it's true in most cases, at least. In the
process, convert two QVERIFY(... == ...) into QCOMPARE(..., ...)

Task-number: QTBUG-64940
Change-Id: I7590f20f37b0b459aafb3d1d08f6eb77932fa027
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 19:03:17 +01:00
Edward Welbourne
c9d9a161aa Use the CLDR endonym in the documentation
Not sure where the docs got "Schwiizertüütsch" but it's not what CLDR
gives for Swiss-German's endonym.

Change-Id: I25d0aabea061ea34021311a2ec11d14ce61502d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2023-01-12 19:03:16 +01:00
Edward Welbourne
abac1e5d32 Don't std::move a trivially-copyable QTimeZone::ShortData
CodeChecker (clang-tidy) grumbles about it and it's pointless for a
trivially copyable type. So make the relevant constructors simply take
ShortData by value.

Change-Id: I49ea180df26c6fd56591f3f21a285b1f697352dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 19:03:16 +01:00
Edward Welbourne
f5437a9d58 Include tzInfo.StandardBias in getCurrentStandardUtcOffset()
It's usually zero, but in principle we should include it (when it's
not flagged to be ignored), see
https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/ns-timezoneapi-time_zone_information#members
https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation
for details.

Task-number: QTBUG-109974
Change-Id: I8b6e0ea31a1cbd0e88f23ab01854e69258b0056b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-12 19:03:16 +01:00