Commit Graph

57379 Commits

Author SHA1 Message Date
Edward Welbourne
607c5a90c5 Fix initialization of QDateEdit and QTimeEdit
Since 6.3 these use Qt::UTC as time-spec but I neglected to take that
into account in QDateTimeEditPrivate::init()'s construction of a
QDateTime from the QDate or QTime. This amends
commit c00ee2f310.

Fixes: QTBUG-105322
Pick-to: 6.3 6.4
Change-Id: I11dec9808a54cf7da401b1734a9a2812f5fd2e63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 20:39:52 +02:00
Edward Welbourne
a46a426b43 Fix handling of invalid input to Q(Date|Time)Edit constructors
Change to match how QDateTimeEdit()'s overloads taking a QDate or
QTime work, substituting a default value in place of an invalid one.
This fixes one surprising anomaly in a recently-extended test, so that
it now only fails the way I expected.

Task-number: QTBUG-105322
Change-Id: Ied4da6160b7efe70990f956798fb826b5b36d8bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 20:39:52 +02:00
Edward Welbourne
d1d43b231f Expand QDateTime edit constructor tests to cover Q(Date|Time)Edit
The constructor_qdate() and constructor_qtime() tests only tested
QDateTimeEdit with a QDate or QTime. Extend them to also test
QDateEdit and QTimeEdit constructors, respectively. This revealed one
surprise; the QDateEdit constructor doesn't replace an invalid QDate
with the usual start-date, as the QDateTimeEdit does. It also serves
to reproduce a bug reported in Qt 6.3, see Task-number. These are
all marked XFail for now.

Task-number: QTBUG-105322
Change-Id: Ifafb40a9b78d9314b74ca9a1710d362b9a3cb18d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 20:39:52 +02:00
Edward Welbourne
4579ec04a4 Simplify the data tables for some QDateTimeEdit constructor tests
It makes no sense to pass, as parameters, values that can't vary
between test data rows, so eliminate m{in,ax}imum{Dat,Tim}e
columns. There were no parameters used to control how those would be
set, so they were always going to be the type's defaults.

The displayDateTime was only needed for the invalid test, in which its
value is known and fixed; for the normal test it was necessarily
implied by the parameter used to initialize the QDateTimeEdit. While
the QDate and QTime tests do have to supplement that construction
information, the other part is again known and fixed. We can check the
data-tag against "invalid" to determine which known and fixed data to
use, saving the need for a data table column.

Change-Id: I3754ba1a6a127a4a872a7f4a3e7edad9a5ff0ec0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 20:39:52 +02:00
Laszlo Agocs
f6dc0b4b20 Skip potentially costly features in QVulkanWindow
QVulkanWindow has recently been updated both in 5.15 and 6.x to start
enabling at least the 1.0 core features, because modern validation
layers are likely to complain if a feature is used without the
corresponding flag enabled upon device creation, even if the driver does
not actually care.

There is a catch here however, namely that some features may be true
opt-in flags, e.g. robustBufferAccess, and when enabled, they may incur
a performance penalty. So we will keep that one feature disabled even
when it is reported as supported.

It is unfortunate that VkPhysicalDeviceFeatures mixes together flags
that are most likely used only to query if some feature is supported by
the implementation while not serving as a real toggle (because opting
in/out is meaningless for the implementations in practice), and flags
that have significant effects when the feature is enabled, for example
when it comes to performance.

As QVulkanWindow only cares about 1.0, and 1.1+ features are to be
handled by the application via the features-modifier callback, we can
get away by just disabling robustBufferAccess and passing in everything
else supported as-is for vkCreateDevice.

Task-number: QTBUG-105158
Pick-to: 6.4
Change-Id: I963402ab50f6e5d3fa6824680f69cff8568b669a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-04 20:39:52 +02:00
Marc Mutz
8128abeaec Fix qYieldCpu() for ARM < ARMv7
Apparently, we still support these architecture versions, and there's
no way to detect ARMv6k-or-greater specifically, so exclude yield for
ARM < ARMv7.

Amends 877c158c59.

Fixes: QTBUG-104316
Pick-to: 6.4 6.3
Change-Id: I51a2f0f8e0993dba41e47bb6110473ac8e7cd32a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 18:21:06 +00:00
Sona Kurazyan
fd681d3e85 Move q{,Utf8, Utf16}Printable to qstring.h
Task-number: QTBUG-99313
Change-Id: I76ef84e4c90ab04a3e04c165ba46800e27ea6122
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-04 20:21:06 +02:00
Michael Saxl
e995bfc0ea update function argument of SSL_CTX_set_options
openssl3 uses uint64_t for the options argument in SSL_CTX_set_options,
older ones used long.
sizeof(long) is not the same on any platform as sizeof(uint64_t)

Fixes: QTBUG-105041
Change-Id: If148ffd883f50b58bc284c6f2609337d80fb5c58
Pick-to: 5.15 6.2 6.3 6.4
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-08-04 18:47:10 +02:00
Laszlo Agocs
e00e215e00 rhi: vulkan: Enable all but one of the 1.0 core features
VkPhysicalDeviceVulkan11Features and co. need to be considered
separately, for now we just sync the enabling of 1.0 core
features between QVulkanWindow and QRhi, both in 5.15 and 6.x.
For QRhi in Qt 6 this will need to be amended separately once
the myriads of 1.1/1.2/1.3 features are investigated.

Like everywhere else, robustBufferAccess is disabled. We do not
want features that likely affect performance. To be checked
later on if adding some sort of opt-in mechanism for this is
sensible or not.

Task-number: QTBUG-105158
Pick-to: 6.4
Change-Id: Ia3d8c1e6bb8be8643e80178954dca0aa8b92d3c0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-04 14:53:28 +02:00
Sona Kurazyan
9cbdc0f14c qoverload.h: add the missing QT_{BEGIN, END}_NAMESPACE macros
Amends ff8de321e2

Change-Id: I2437274ae365ef896b22408bc90f763141359618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 14:53:08 +02:00
Oliver Wolff
9a5ac4bcb3 Add keyword msvc-2022 to testlib blacklisting
Pick-to: 6.2 6.3 6.4
Change-Id: I04942dc9474fd2abfc341a1dd6434f7c78b6b5bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 10:18:41 +00:00
Mårten Nordheim
373285857f QtHttp: Lower the severity of some log output
The output was only printed if the request was no longer available
queued, meaning that it had been removed before the socket had finished
its connection attempt. That means the result of the attempt is not of
much interest to the user so we should not print it out as a warning.
The reason for why the request was removed from the queue would be the
interesting bit, but it's not covered here.

Task-number: QTBUG-85248
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Iac483b8bb600e1577fe88c3699e46d50615bfccb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-08-04 11:23:55 +02:00
Thiago Macieira
e0eb93d9a2 QLatin1StringView: delegate operator== to QByteArrayView
It's the same implementation. This also inlines the actual comparison,
to allow the compiler to implement the inline memcmp, if it so wishes.

operator< could be changed too, but QByteArrayView's makes an out-of-
line call to QtPrivate::compareMemory, whereas QLatin1StringView's calls
memcmp() directly, which allows the compiler to optimize.

Change-Id: I89c4eb48af38408daa7cfffd16fde9f2b0a8590b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-08-04 00:37:35 -07:00
Thiago Macieira
751919d4de QByteArray: delegate more of operator== & !+ to QByteArrayView
QByteArrayView is capable of dealing with null pointers.

Change-Id: I89c4eb48af38408daa7cfffd16fde9ab021ebf06
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-08-04 00:37:35 -07:00
Thiago Macieira
cfa955040c QVariant: pass the size and alignment to PrivateShared::create()
Instead of having that function load those from memory. This allows us
to pass constant expressions in QVariant::Private s constructor

Change-Id: I3859764fed084846bcb0fffd17045ddd62553710
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-03 19:51:25 -07:00
Thiago Macieira
392e445393 QVariant: don't leak PrivateShared if the constructor throws
This means we can't do a tail-call from customConstruct when
PrivateShared is in use. But the case without that is still a tail-call.

Change-Id: I3859764fed084846bcb0fffd17045d144181ea84
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-03 19:51:22 -07:00
Thiago Macieira
0db329e48d QVariant: add noexcept to fromValue when possible
Even though it's calling a noexcept(false) constructor, we can declare
when it it won't throw and allow the caller to suppress its own
exception handling.

This necessitated splitting the Q_DECLARE_SHARED into its components
because fromValue<QVariant> uses QTypeInfo<QVariant>::isRelocatable.

Change-Id: I3859764fed084846bcb0fffd1704503aa4d3e535
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-03 19:51:21 -07:00
Thiago Macieira
181aec92b6 QVariant: reorganize the constructors in the header
Group them by noexceptness and then organize each group logically. We
also don't need to #ifdef the constructors for the unavailable classes,
as they are forward-declared.

Change-Id: I6f936da6f6e84d649f70fffd17060903c78edf0f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-03 19:51:18 -07:00
Sérgio Martins
9ccbbeecbd eglfs: Ensure correct z-order of windows
- The main window needs to be at the back always, since it's fullscreen. If the root
window gets in front then there's no way to retrieve the secondary windows.

- Qt::Tool and transient child windows go to front as in other QPAs

Change-Id: I4a2793628250756bc07daaee0763ea7174a7bebd
Pick-to: 6.3 6.4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-08-04 02:55:27 +01:00
Sergio Martins
40d781b7b5 eglfs: Fix mouse events not being delivered to the frontmost window
Since QPlatformScreen::topLevelAt() wasn't implemented it would just fallback
to use QGuiApplication's window list.

Possibly fixes any other bug that relied on QApplication::topLevelAt().

The fix is to consult the compositor, which has proper z-order information,
unlike QGuiApplicationPrivate::window_list.

Task-Id: QTBUG-105256
Pick-to: 6.3 6.4
Change-Id: I4202dd5d87e41b69c461c808d29b809af5b52d09
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-08-04 02:55:27 +01:00
Tor Arne Vestbø
8669949f0d Remove if_types.h workaround for watchOS
watchOS is no longer supported, nor should the workaround be necessary
anymore.

Pick-to: 6.4 6.3 6.2
Change-Id: Id5898d14b10e8f4aeaf6ce42ab39dbfdff9338ef
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-08-04 03:35:36 +02:00
Laszlo Agocs
651092c218 Bump QVulkan(Device)Functions to Vulkan 1.3
Update vk.xml to 1.3.223 and make qvkgen output the Vulkan 1.3 functions
as well.

[ChangeLog][QtGui] QVulkanFunctions and QVulkanDeviceFunctions are
updated to expose the Vulkan 1.3 API as long as the build environment's
vulkan.h is 1.3-capable.

Fixes: QTBUG-105270
Change-Id: Iabe04f0a74cdbd94efcc1869f545da058a553fed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-04 03:35:36 +02:00
Marc Mutz
011b68d3cd QByteDataBuffer: assert an undocumented precondition
The alternative would be to return a null QByteArray, but the current
implementation makes calling read() on an empty QByteDataBuffer UB, so
this is behavior-preserving, just with a bit nicer error message.

Pick-to: 6.4 6.3 6.2
Change-Id: Ia9db7acbfa47e601b466d6cc6a728859065c27b5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-08-04 03:35:36 +02:00
Marc Mutz
046a5a8f4f Eradicate QT_STRINGVIEW_LEVEL
It was designed to gauge the impact of replacing QString functions
with QStringView ones, as opposed to just overloading, but that never
came to pass, for two reasons:

1. We never got to implement a full set of overloads with the pattern
   in a large enough library (QtCore) for results to matter.

2. QStringView doesn't accept everything that QString accepts, making
   it unsuitable as a drop-in replacement (QAnyStringView has that
   property, though, but we never added a QT_ANYSTRINGVIEW_LEVEL
   macro).

So, R.I.P. QT_STRINGVIEW_LEVEL.

Fixes: QTBUG-100861
Pick-to: 6.4
Change-Id: I0a9318177acb295e8eeeddfb345449112070c597
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-04 01:35:36 +00:00
Marc Mutz
841ff3b73f Fix QString::arg() for format strings > 2Gi characters
The getEscape function truncated the qsizetype position it got from
the caller to an int, potentially parsing a previous escape sequence
(or, more likely, garbage), by getting the position in the string
wrong.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103531
Change-Id: I3b921c0991d238bbacfe6699c56146fe032134df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-04 03:35:36 +02:00
Marc Mutz
753079b707 Statically assert that the __mips_dsp code is only active on 32-bit
I was told this is 32-bit-only code in Qt 5, where it didn't really
matter, because only QStringView could handle > INT_MAX character
strings. Put up a big stop sign now in Qt 6 to enforce that this
information is correct, incl. notes for when it turns out it isn't.

Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-59150
Task-number: QTBUG-103531
Change-Id: I4620a43e2e67776cc67531fa993a7bb8e01cffed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-04 01:35:36 +00:00
Laszlo Papp
3698186f9d QAbstractNativeEventFilter: Fix the Mac example class name
Change-Id: I838350883fa6bd8c80f87fba18f006afd905ed61
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-04 00:49:01 +01:00
Tor Arne Vestbø
6ec21881dd CMake: Override simulator architecture to x86_64 for Xcode generator
The simulator build of Qt for iOS is currently x86_64 only, instead
of universal builds with an arm64 slice as well, since we don't
support xcframeworks. This means we can't rely on Xcode's default
simulator arch settings, which on an Apple Silicon Mac will be
arm64.

Instead we override the simulator arch, like we do for qmake.

Pick-to: 6.4 6.3 6.2
Change-Id: I8b52389db1b83f4f9679c724bcde53b44dbc76f1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-03 21:40:08 +02:00
Andy Nichols
3f450a6ba0 Defer release of QMetalGraphicsPipeline objects
Pick-to: 6.4
Change-Id: Ia7ee1a1b13a8b5ac1ef4859330150f0558793dfe
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-08-03 20:46:30 +02:00
Fabian Kosmale
84ab6c1aa1 moc: handle attributes in class declarations
We already had code to handle attributes on funtcions, but we didn't
handle them correctly for classes so far.
Fix this by simply skipping over the attribute.

Fixes: QTBUG-105310
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: Ic4149f940e74820de4f2fa9540d9dc5b4e626a3a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-03 20:14:42 +02:00
Tor Arne Vestbø
d5580aa719 cmake: Share most finalizers between macOS and iOS apps
The macOS app code path was missing a bunch of finalizers that also
makes sense for macOS apps.

Pick-to: 6.4
Change-Id: I2b779a1d64086824f43e304f2c7d3b1cd2780070
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-03 20:14:42 +02:00
Sona Kurazyan
7de21b268a QDom: use QDomDocument::ParseResult for storing the error info
And use the new struct as a result type for error getters instead of
std::tuple. The line and column numbers, therefore, grow to qsizetype
instead of int.

As a drive-by, make the getters inline.

Change-Id: Iad652063af2c9183cb60f27320c2a800ae28ba36
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-03 20:14:42 +02:00
Sona Kurazyan
8cc389068b Improve QDomDocument::setContent() API
Added new setContent() overloads, that:

 - take parameter of new ParseOptions enum type for specifying the parse
   options that can be used for enabling namepsace processing and, in
   future, whitespace-only text nodes, etc.

 - use ParseResult for returning the information about error message,
   line and coulmn number, instead of three parameters for each.

 - use QAnyStringView for a QString input data.

To avoid ambiguities when calling setContent() with one argument,
removed the default argument for errorString from all the overloads.

[ChangeLog][QtXml][QDomDocument] Added new setContent() overloads that
allow specifying different parse options through ParseOptions flags.
These overloads use a new ParseResult struct for returning the
information about an error, and QAnyStringView for passing string input.

[ChangeLog][QtXml][QDomDocument][Potentially Source-Incompatible Changes]
setContent() overloads that take only one argument now return
ParseResult instead of a bool. ParseResult explicitly converts to bool,
so the expressions calling setContent() with one argument will continue
compiling, if they are contextually convertible to bool. If an implicit
convertion is required (e.g. bool b = doc.setConetnt(data)), the result
needs to be explicitly converted to bool first
(e.g. bool b = bool(doc.setConetnt(data)).

Task-number: QTBUG-104507
Change-Id: If6a78f8c9b1458f0e3ae719bfd3703a0b965449c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-03 20:14:42 +02:00
Fabian Kosmale
b65e37b744 qmetaobject: Fix sign-compare warning
Simply cast from uint to qsizetype: All supported compilers will already
complain long before we reach an argument can that can represented by
unsigned int but not by qsizetype.

Change-Id: I455bde34db6b50ae9e017c7e2e811e22df926614
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-03 19:43:35 +02:00
Mikolaj Boc
b7802b401f Use the correct module exports in qtloader
Refactoring of module exports in qwasmintegration.cpp was not followed
by adjusting the qtloader. Do this now.

Fixes: QTBUG-105264
Change-Id: Ibb0a4a20c0df1409cdcbba04ebd42c1569ae586a
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-08-03 19:43:35 +02:00
Laszlo Agocs
3ee65daa74 rhi: d3d: Switch to DirectComposition for semi-transparent windows
A window with alpha > 0 is no longer forced to using a legacy,
non-flip swapchain. Instead, the Win8+ DirectComposition API is used
in that case to get a properly composited semi-transparent window.

The remainings of the non-flip model swapchain support, that was left
after purging Windows 7 in order to support semi-transparent windows,
is now gone completely. Setting QT_D3D_NO_FLIP has no effect from now
on. DXGIFactory2 and flip model swapchains are now always required and
in use.

There is one downside when it comes to the swap effect: for
semi-transparent windows we will be stuck with SCALING_STRETCH as
SCALING_NONE is not supported on this path. Using NONE over STRETCH
was preferable for typical Qt applications because user interfaces
typically look "nicer" during resize without stretching when ending up
with a size-mismatched Present. For normal (non-translucent) windows
this will continue to be the case, but enabling alpha will now move
back to SCALING_STRETCH implicitly.

In addition, it looks like AlphaMode is ignored when using
CreateSwapChainForComposition. Setting DXGI_ALPHA_MODE_STRAIGHT fails
always whereas other values lead to an identical looking (with
transparency) result. Therefore we just set it to
DXGI_ALPHA_MODE_PREMULTIPLIED regaredless of which QRhiSwapChain alpha
flag is set.

Fixes: QTBUG-105271
Change-Id: Ie7a584e1656ccfdb506489ea21c41706f57c4018
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-03 19:06:19 +02:00
Laszlo Agocs
71e3840f3a rhi: vulkan: Improve alpha swapchain logic
Fixes: QTBUG-105011
Pick-to: 6.4
Change-Id: Iea113d92e3261711b4fce88733cc2d7472b10829
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-03 19:06:19 +02:00
Laszlo Agocs
0fb4b49d1d vulkan: Request an 1.3 instance if supported
This affects the users of the QVulkanInstance creation helper, which are
Qt Quick and the backingstore compositor for texture-based widgets.

Change-Id: I6c3eccfade3cf9be7811dda66aca9d63ece4534c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-08-03 19:06:19 +02:00
Mårten Nordheim
5c0ce1b14c Schannel: move final read to disconnected()
Instead of disconnectFromHost where I accidentally put it.
Also change the condition for reading data to match.

Change-Id: I4c58f8e0fc04ff6a773158ca0150dd0a3098b36b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-08-03 18:38:53 +02:00
Edward Welbourne
a9b46b79dd Rearrange the skipping of a test to give a better message
When tst_QDateTime::fromStringStringFormat_localTimeZone_data() skips
due to feature timezone being undefined, it should report that as the
issue, rather than claiming the system doesn't support the particular
zones used in the test.

Change-Id: I9837ac95c6d92317fbec7fcca184f7b7e6f81441
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-03 18:38:53 +02:00
Edward Welbourne
0a36a7c1db Make 'zz' format an alias for 'z' in time format strings
Also document the (seldom helpful) handling of over-long repeats of a
format. Add test to QDateTime and amend QLocale test.

[ChangeLog][QtCore][QDateTime] Doubling the 'z' format in a date-time
or time format string now produces the same output as a single 'z'.
Previously, this would have produced two copies of the milliseconds
field (eliding any trailing zeros in each). Contrast with 'zzz', which
produces the full milliseconds field, including any trailing zeros.

Change-Id: I4c60462b062fee4079370096d745c191c1939506
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-03 18:38:53 +02:00
Alexandru Croitor
effd6f63f1 CMake: Fix single standalone tests to use same Qt C++ language std
When using qt-cmake-standalone-test, we didn't tell CMake to use the
same C++ language standard that Qt used when it was configured.

We did tell CMake to do that when configuring tests with
qt-internal-configure-tests via the qt_build_tests macro.

To ensure the proper standard is set, we also need to
find_package(Qt6Core), because the std flag is derived from the
QT_FEATURE_cxxyz flag which is set by Core.

Change-Id: Ia41f2a24983ddab0107a6446743f7b054df8c033
Pick-to: 6.2 6.3 6.4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-03 18:38:52 +02:00
Andy Shaw
41c4f9a47a SQLite: Update SQLite to v3.39.2
[ChangeLog][QtSQL][SQLite] Updated SQLite to v3.39.2

Fixes: QTBUG-103675
Pick-to: 6.2 6.3 6.4 5.15
Change-Id: Ic75ffacc53cf17c08e328921dcc0f7abe09ed1ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-08-03 16:08:36 +00:00
Oliver Wolff
51acd47082 Disable constinit for MSVC compilers
https://developercommunity.visualstudio.com/t/C:-constinit-for-an-optional-fails-if-/1406069
does not only affect constinit thread_local but also constinit in
general on MSVC compilers when C++20 is being used. So disable the
feature for these compilers in general for now.

This commit amends d9531593a2

Fixes: QTBUG-105234
Pick-to: 6.4
Change-Id: I1855f0857d85487895460fc7c56675fb864bfa73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-03 15:59:06 +00:00
Yuhang Zhao
870cfa4e17 QSysInfo::prettyProductName(): add missing macOS product names
Pick-to: 6.2 6.3 6.4 5.15
Change-Id: I9163917187b7a4cbf48e443303313b25473b229f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-08-03 23:24:21 +08:00
Yuhang Zhao
8a0e0f8cc1 QtBase: Windows: Replace some deprecated API usages
Microsoft recommends to use CoInitializeEx()
and SetWindowLongPtr()/GetWindowLongPtr() in new code.

Use COINIT_DISABLE_OLE1DDE to avoid overhead of
initializing and using obsolete technology.

Pick-to: 6.4
Change-Id: I9d16943e864d4487dd4f46fd9325579c298c52b9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-08-03 23:24:21 +08:00
Lucie Gérard
fb1b20eab3 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-03 17:14:55 +02:00
Alexandru Croitor
15117f84bb CMake: Relax constraint on not having feature values change
Previously if qtbase was built with feature A set to ON, then building
qtsvg, then rebuilding qtbase with feature A set to OFF, trying to
build qtsvg would fail with an error message at configure time saying
that the feature value has changed.

This check was added quite early in the Qt CMake port, presumably to
catch accidental reconfigures that might cause long rebuilds.

This has dubious benefit though. We constantly had people telling us
they get the error without knowing what to do. The usual advice was to
remove CMakeCache.txt and reconfigure.

Instead of forcing people to suffer this dance, relax the constraint
by issuing a warning instead of an error, and make it more clear why
a rebuild might happen (a changed feature value might change
the generated module C++ header file which in turn might be included
by various project sources).

Amends 20633d97ab

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-95834
Change-Id: I992bd61024958869f3b995471b4c7ff75e3a33a0
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-03 17:14:55 +02:00
Joerg Bornemann
97fa1f24b9 CMake: Remove the CLASSNAME argument from qt6_add_plugin
CLASS_NAME should be used instead.

There should be no user projects that use CLASSNAME.  It was only added
for internal use for a transitional period.

Change-Id: I450f912c395907a72e2078b5d458c1c3bd115b8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-03 08:02:41 +02:00
Joerg Bornemann
626c3f56cf CMake: Remove internal __qt_add_plugin_*_args variables
All references to these variables have been removed from Qt
repositories.

Change-Id: Icca4668ec183ff543d04097600f8a8869066f8cc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-08-03 08:02:37 +02:00