65727 Commits

Author SHA1 Message Date
Juha Vuolle
fd6dc2e9e7 Remove QHttpHeaders::names()
We need a way for users to consume the complete contents of
QHttpHeaders.

Until now, the only way was

    for (const auto &name : h.names())
        use(h.value/combinedValue(name));

which is quadratic.

Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.

So we added nameAt() and valueAt() functions in previous commits to
enable efficient indexed iteration without the need to expose a
value_type. Having added those, we can now remove names(), which had
the wrong value_type (QByteArrays are by definition UTF-8 in Qt, while
header names are L1), and is no longer needed to facilitate iteration.

In QNetworkRequestFactory, temporarily use toMultiMap() because we
need the combinedValue() of all headers here. The fix will be to make
QNetworkRequest QHttpHeaders-aware, but that's a Qt 6.8 thing, even
though we should still de-pessimize this code for Qt 6.7 with private
API.

Resulted from API-review.

Pick-to: 6.7
Change-Id: I65086ef4c62e22554ae7325a846bebc08b44916f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-20 03:35:32 +00:00
Juha Vuolle
1965940037 Add QHttpHeaders::nameAt() function
We need a way for users to consume the complete contents of
QHttpHeaders.

For now, the only way is

    for (const auto &name : h.names())
        use(h.value/combinedValue(name));

which is quadratic.

Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.

So add nameAt() and (in a previous commit) valueAt() functions to
enable efficient indexed iteration without the need to expose a
value_type.

Return by QLatin1StringView, not QAnyStringView, because that
statically encodes the actual encoding used (and required by HTTP
specs and promised by the class documentation, so it won't need to
change). For the setters, we want to be accomodating QString,
QByteArray, etc, which is why those take QAnyStringView.

Resulted from API-review.

Pick-to: 6.7
Change-Id: I0153c5aad0f6260b5dbc963de0aaf4ef42fdd4f1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-01-20 04:35:29 +01:00
Juha Vuolle
4bb12dab6a Add QHttpHeaders::valueAt() function
We need a way for users to consume the complete contents of
QHttpHeaders.

For now, the only way is

    for (const auto &name : h.names())
        use(h.value/combinedValue(name));

which is quadratic.

Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.

So add valueAt() and (in a follow-up) nameAt() functions to enable
efficient indexed iteration without the need to expose a value_type.

Resulted from API-review

Pick-to: 6.7
Change-Id: I863f59618cea5682386ce26b66b4b1655eac7950
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-20 03:35:25 +00:00
Tor Arne Vestbø
a5292ad2f5 tst_QWidget::renderInvisible: Use QImage::Format_ARGB32_Premultiplied
The test renders QCalendarWidget, which ends up in the QStyle code
eventually. On macOS we use a CGContext to draw the native style,
into the test's image/paint device, but CGBitmapContextCreate does
not support QImage::Format_ARGB32. It needs either a premultiplied
alpha, or no alpha at all.

The unification of the palette for the calendar, as is done for
Windows, is also needed on macOS.

Pick-to: 6.7
Change-Id: I5b26e5434b84e4b14eb8784875b76810e0a14230
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-01-20 03:53:20 +01:00
Volker Hilsheimer
f63e531826 Doc: fix QStandardPaths::displayName qdoc warning on macOS
The function definition at the location of the documentation is not used
on Q_OS_DARWIN, so qdoc cannot tie the documentation to it, leaving
broken links and qdoc warnings when building the documentation on
macOS.

Fix this by explicitly specifying the function that's being documented.

Pick-to: 6.7
Change-Id: Icf2ad1eba9e9ec8cbeea3818b414f740fa31083f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
2024-01-20 03:53:20 +01:00
Mårten Nordheim
99da7c23c3 invokeMethod: std::forward universal-ref argument
Spotted in API review

Pick-to: 6.7
Change-Id: I4ab660bb9955176f40b4123e775d65c17edbeeb8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-20 03:07:32 +01:00
Fabian Kosmale
d3d224f546 QMetaObjectBuilder: Avoid arithmetic on null pointer
In Prepare mode, "buf" is a null pointer. We never dereference it, but we
still compute an offset from it to obtain a pointer to a (then unused)
QMetaObjectPrivater.
clang's UBSan complains about this, so initialize the pointer to nullptr
instead when in Prepare mode.

Pick-to: 6.7 6.6 6.5
Change-Id: Id9d78058f72bb1b44440d07f565374f3eb3c20fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-19 23:49:32 +00:00
Mårten Nordheim
c60db31883 SignalDumper: protect access to ignoreClasses
It's a shared list that, in theory, can be written to by multiple
threads. Protect it with a mutex.

To make the change in a clean way, move all the .contains() checks
into a separate function so we can simply hold the lock in there.

Pick-to: 6.7 6.6 6.5
Change-Id: I99ff185346d52e43a3f59f2910a7b2fa6031e3e4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-01-19 22:28:00 +00:00
Alexey Edelev
6ce6ff1c52 Force CMake to look for static versions of xcb components
Add the USE_XCB_<component>_STATIC switches that force using the
static versions of xcb components if necessary.

The xcb components needs to be built with -fPIC option, to make the
static linking possible.

When Qt is built staticaly USE_XCB_<component>_STATIC needs to be
passed to the application command line, since in static case xcb
libraries are resolved and linked when configuring application, but
not when building Qt.

Pick-to: 6.7 6.6 6.5
Task-number: QTBUG-120769
Change-Id: I274e9cf4a6a111dc87ad84bb7f49cad76a3d364a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2024-01-19 20:44:59 +00:00
Marc Mutz
b211d8a8c0 QCalendarBackend: disable copying
Silences clazy-copyable-polymorphic.

The Q_DISABLE_COPY_MOVE() disables the implicit default constructor,
so bring it back with =default.

Amends aa8393c94fea01a4806b204fd3aa343a4e90666b.

Pick-to: 6.7 6.6 6.5
Change-Id: I44f0b19208d3865fb84e277bcaf65d7f4541d368
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-19 16:51:26 +00:00
Marc Mutz
3512fb1ec5 QCheckBox: deprecate stateChanged()
[ChangeLog][QtWidgets][Deprecation Notices][QCheckBox]
stateChanged(int) has been deprecated in favor of
checkStateChanged(Qt:CheckState).

Found in API-review. Amends 5a96d13bb5abd5339cf21dd1de7a17152c71f0fc.

Pick-to: 6.7
Change-Id: I6ff4aa38c2f43622ba4b127420aff83790785455
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-19 17:51:14 +01:00
Christian Ehrlicher
6dfc988ea0 QSqlDriver: add Q_PROPERTY
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.

Task-number: QTBUG-120566
Change-Id: Ibbafde35bb5600453ed3a3de36b6bf2b5c560e5f
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-19 17:29:09 +01:00
Christian Ehrlicher
9806f54a58 QSqlField: add Q_PROPERTY
Add Q_PROPERTY to follow the current Qt style and simplify the
documentation.

Task-number: QTBUG-120566
Change-Id: I593ba9f322273991661c1d14fb51dcb23678ea0f
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-19 17:29:06 +01:00
Christian Ehrlicher
2690822428 Examples/sqlbrowser: improve coding style
Fix the coding style to match the current Qt style.

Pick-to: 6.7
Fixes: QTBUG-68661
Fixes: QTBUG-120909
Change-Id: I314ca9da8a03727e3e0336a23fce1ce9d065d3a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-19 17:27:25 +01:00
Orkun Tokdemir
dc4159286b qt6_wrap_cpp: Add .moc generation
When a `.moc` file is included in a source file and that source passed
to `qt_wrap_cpp`, Users should add the generated `.moc`s path to the
target's  include path. Since we don't share anything about the output
path of generated files by `qt_wrap_cpp`, it makes sense to add in
inside `qt_wrap_cpp`. And also, the generated `.moc` file is added
to target's source to complete the dependency graph. Otherwise, Users
need to get output variable and pass it to target's sources.

* Update docs
* Add test

[ChangeLog][Build System] qt_wrap_cpp will accept .cpp files from now
on. When .cpp a file is passed to qt_wrap_cpp, TARGET parameter
becomes required. Generated .moc files are added to target's sources
inside qt_wrap_cpp. That's why the output parameter will not contain
generated .moc files.

Fixes: QTBUG-113402
Change-Id: I54dd2b1ff8e5c9ba457b1eb4f73b0a8190d9c659
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-01-19 16:16:51 +01:00
Edward Welbourne
bcdd51cfae Prepare to support taking CLDR data from its github upstream
We've previously used the zip-file form, but that's not been published
for CLDR v44.1 - the advice on the list was to use github
instead. That, however, has ↑↑↑ as a special value for fields, meaning
to inherit from a prent locale. So special-case that value. I have
verified that v44 from the zip file produces identical results to v44
from github, with this minor fix. As it happens v44.1 also produces
identical results.

Pick-to: 6.7 6.5
Change-Id: I6eb0aedda7556753cdc83bb9d76652fbb68dc669
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2024-01-19 15:38:25 +01:00
Edward Welbourne
fcd2a219c4 Make QLocale self-consistent on Windows
The constructor and update() method for the system locale were using
GetUserDefaultLCID(), where query() and the fallback locale first
checked the LANG environment variable, leading to inconsistent results
if the user set the environment variable to something different from
the system's configured locale.

Break out the logic of parsing %LANG% into a static helper, replace
the existing parsing with a call to this and add a helper to get the
right ID to use, possibly via it, using GetUserDefaultLCID() as
fall-back. Drive-by: initialize substititionType in its declaration.
Also look up %LANG% each time we want it; it's not that expensive,
given how rarely this code is called, and client code could change its
value at runtime. Partially inspired by a patch from Wladimir
Leuschner <wladimir.leuschner@qt.io>

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-120961
Change-Id: Ie706c7089bd2b3757a3eab627723ec34a5e2b07f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-19 15:38:25 +01:00
Ivan Solovev
cfc385ce3f qfloat16: make relational operators constexpr when QFLOAT16_IS_NATIVE
When qfloat16 uses float as an underlying type, the operators cannot be
constexpr, because operator float() is not constexpr.
However, operator NativeType() is, so we can make the relational
operators constexpr when we are using a native 16-bit float as an
underlying type.

To avoid code duplication, introduce new temporary macros for
constexpr and Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE.
Extend the tests to verify that the operators are constexpr when
native float16 type is used.

Task-number: QTBUG-119433
Pick-to: 6.7
Change-Id: I001b087d78c398c71b71a504b65c316199dd4792
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-19 13:58:57 +01:00
Ivan Solovev
1353c6f857 Introduce macros to simplify testing comparison
The problem with the QTestPrivate::testAllComparisonOperators() and
QTestPrivate::testEqualityOperators() functions is that if they fail,
they point into the helper function, but not into the actual test that
called the helper function. This is specially annoying when some test
calls the helper function multiple times.

This patch introduces the helper macros QT_TEST_ALL_COMPARISON_OPS and
QT_TEST_EQUALITY_OPS that wrap the respective function calls together
with the QTest::currentTestFailed() check. If the test has failed,
the macro generates a meaningful debug message with the original file
name and line number.

This patch also applies the new macros to qtbase.

Task-number: QTBUG-119433
Pick-to: 6.7
Change-Id: Iad709de45e5bf53c82e7afa8e9f51e9275c1e619
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-19 12:58:57 +00:00
Volker Hilsheimer
a73f10aee4 QFont::Tag: optimize toString by not searching for terminating null
The compiler knows how large the array is, so pass the size and drop
the terminating null.

Pick-to: 6.7
Change-Id: I5795c89834b8395f04d1777d737d080f19be2a21
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2024-01-19 13:58:57 +01:00
Marc Mutz
88c3cd6e08 QMetaTypeModuleHelper: mark instances constexpr
Static and thread-local objects should be constexpr or constinit if possible.

Task-number: QTBUG-100485
Pick-to: 6.7 6.6 6.5
Change-Id: I29088798a50d6278252c9088e7c191c4214b2e5b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-01-19 10:15:25 +01:00
Axel Spoerl
3195e34742 Test restored state in tst_QDockWidget::hideAndShow()
4c60a11d8f935abb762a83b0ab99cefa6db3060c had to be reverted, because it
broke restoring the state of hidden, floating dock widgets.

Extend tst_QDockWdget::hideAndShow() to test this functionality.
Blacklist test function on Apple, because Apple machines on CI show
dock widgets with the main window.

Task-number: QTBUG-120191
Pick-to: 6.7
Change-Id: Ibc6121a99f15f33d62ca0a9376dbe9fafbe20290
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-19 05:01:50 +00:00
Thiago Macieira
6f9db71154 QUuid: Fix Id128Bytes alignment on some architectures
This partially reverts eb0abd9789062d95bc62dbbc29b2038dc40472b1 so we
depend on __SIZEOF_INT128__ in this structure, not on QT_SUPPORTS_INT128
so the Id128Bytes union has a quad-word integer as a member at all
times, even in QtBluetooth's removed_api.cpp.

That's required because on some ABIs, the presence of this member causes
the type to be passed differently, usually in registers (we fixed the
stack problem with the alignas(16) in that commit).

The "Itanium Software Conventions and Runtime Architecture Guide" did
the same back in 2001; section 8.5.1 says integers from 65 to 128 bits
are passed "Next Even" and so are aggregates with alignment of 16 bytes.

This rule seems to also exist in the AArch64's AAPCS64[1], which says,
in rule C.10, that the type should be passed in even registers:
 C.10 If the argument has an alignment of 16 then the NGRN is rounded up
      to the next even number.
(NGRN = Next General Register Number)

It's unclear whether this applies to the union type as a whole or to its
individual members. If the latter, then Clang may be buggy.

[ChangeLog][Important Binary-Incompatibity Fixes] The QUuid::Id128Bytes
type had a loose definition that could cause it be passed incompatibly
between functions, in some architectures, depending on whether GNU
extensions were allowed. This is now fixed, but may cause code compiled
with Qt 6.6.0 and 6.6.1 to fail when recompiled with 6.6.2 or later.

[1] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#682parameter-passing-rules

Fixes: QTBUG-119248
Pick-to: 6.6 6.7
Change-Id: I6e2677aad2ab45759db2fffd17a86a208f788cb7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-18 18:50:12 -08:00
Thiago Macieira
89b4a236a4 filetest: add moveToTrash() operation
Pick-to: 6.7
Change-Id: I76ffba14ece04f24b43efffd17ab43f3f2ecde59
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-01-18 18:50:12 -08:00
Matt Aber
bc3b18764a Fix export of QDeferredDeleteEvent, should be Q_CORE_EXPORT
When QDeferredDeleteEvent was declared in qcoreevent.h, it
had Q_CORE_EXPORT. After moving to qcoreevent_p.h, it changed
to Q_AUTOTEST_EXPORT. The correct macro should be preserved.
Noticed that this change was needed to make GammaRay work
with Qt 6.7

Pick-to: 6.7
Change-Id: I6fab494d9f60b1261edce6f326a3b96467ff7da1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-19 02:20:36 +00:00
Aleix Pol Gonzalez
0d923c2097 ibus: avoid a crash when context is not ready
This amends 84cf0e2be54d9ad183db063fd429b792c67edd18

Pick-to: 6.7 6.6 6.5
Change-Id: Ia560f785764d4ba0e4aa66943effb9f16a38e699
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
2024-01-19 00:54:33 +01:00
Ahmad Samir
85108e1938 QTest: remove static keyword from the new qWaitFor() chrono overload
This is a function template defined inside a namespace, `static` makes
no difference here.

Change-Id: I2eb52b4fb4432c269b2449ae37550bd0be0dbbce
Pick-to: 6.7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-19 00:15:59 +02:00
Mårten Nordheim
a3a48815cc QH2Connection: Fix issue with unity-build/odr
The static function appeared in two places, and in a unity-build
this fails quite visibly.

Pick-to: 6.7
Change-Id: I60000d01194a2c79ca9c101f2a6d3f77f469f1a7
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
2024-01-18 21:56:46 +01:00
Axel Spoerl
84b792fa98 Add missing include in tst_QHttpHeaders
A QMultiMap is used, while only qset.h is included.
FTBFS w/o precompiled headers.

Include qmap.h as well.

Pick-to: 6.7 6.6 6.5
Change-Id: I5f6e1d204bfa94cc6a81f6883c7a7b0ee1e9963c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-18 21:17:17 +01:00
Axel Spoerl
b148a362c3 Revert "API Review / QDockWidget: Remove const/ref debug operator"
This reverts commit ca2f46c04c26ed4649cb6c2c62d3b2e52cd8d5ad.

Reason for revert: <BIC in 6.6 found by Marc Mutz>

Pick-to: 6.7 6.6
Change-Id: Ia5b8849e55ebccb514bc753ce1d31855d91e2406
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2024-01-18 20:17:17 +00:00
Ivan Solovev
ecafbc4d5d TestLib: consistently wrap comparison helper macros into do {} while
The CHECK_SINGLE_OPERATOR macro is used inside FOR_EACH_CREF macro,
which, like all other FOR_EACH_* macros in Qt (see qdebug.h or
qmetatype.h), expects its parameter to have a scope or a semicolon.

All other CHECK_* macros are *not* used inside FOR_EACH_CREF, so
they can follow a more traditional approach with the
`do { } while (false)` scope without a trailing semicolon.
This allows to use them in the code like:

 if (condition)
     MACRO(args);
 else
     OTHER_MACRO(args);

In the example above, if MACRO ended with the semicolon, adding
one more semicolon would have discarded the else part of the
conditon, leading to compilation error.

Amends bfb237d19a5319bfa020ad0cefaff72e8d94a9be.

Task-number: QTBUG-119433
Pick-to: 6.7
Change-Id: I9a7f17416ba7c37a50f022f685b54e2643e4a9e2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-18 20:26:23 +01:00
Ivan Solovev
aae6cf8d15 Improve documentation of Qt ordering types
Apply some documentation improvements that were suggested before FF.

Task-number: QTBUG-119433
Pick-to: 6.7
Change-Id: I9b1d83c69821e25ae4cd8db0cbf3fa6d6330a6dc
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-18 20:26:23 +01:00
Viktor Arvidsson
2f9dcf231a QTextDocument: Add missing default pixel font size check for html export
If the size of the documents default font is specified in pixels all
text ranges would get wrapped in a span specifying the font size again.

Change-Id: Iae2ea34d79bb6253badd8a0575489d3fb6409eba
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-01-18 17:59:19 +01:00
Tor Arne Vestbø
06ea3e3994 cmake: Improve folder structure for Xcode and Visual Studio projects
CMake has a built in file extension list for "Source Files", that does
not include qml files. We can't extend that file list with a regex,
so we need to add qml files individually as a finalization action.

We also stuff generated files (both auto-gen as well as other generated
files) into a separate source folder, to focus the project on the user's
files.

Pick-to: 6.7
Change-Id: Ic9a4d9daad088b1874bcf81e75c776537f3ff531
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-01-18 16:39:18 +01:00
Marc Mutz
fab57c25e2 QH2Expected: use Rule Of Zero
It doesn't always pay to be explicit about SMFs. In the present case,
clang-tidy complains that the move ctors of the class aren't
noexcept. It's a false positive, but just removing all the =default'ed
SMFs makes it go away, too.

Amends 0dba3f6b713a657eb3bf2037face72d16253eb92.

Pick-to: 6.7
Change-Id: Ib641d4eed9e214b41c143b60494e82790da6fda8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-01-18 14:49:22 +00:00
Ivan Solovev
26b8e99b1c QEventLoopLocker: use macro to implement move-ctor
We do have special macros for this case, so use one of them!

Amends c2956f8f7685b624d7693ff644125d0f594c585d

Found in 6.7 API review.

Pick-to: 6.7
Change-Id: I205966d6f7363abf1a26f59b04555b1a48a4e696
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-18 15:31:26 +01:00
Ivan Solovev
edf92b8e33 qcompare.h: fix comment for std lib implementation selection
Amends 4b6f757020382ed157bf6beb572549f05e881359

Found in API review

Pick-to: 6.7
Change-Id: I9154c6ad0236776054816bcdde03737290a633ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-01-18 15:31:26 +01:00
Mårten Nordheim
d77162a458 Fix accidental implicit QBA->QString conversion
And make sure it cannot happen again by adding the
QT_NO_CAST_FROM_ASCII define to the Network module.

Amends 5346404da64ac87d161f510d9fee71899d7c70ba

Change-Id: Ib10d7822c514caaf40b6b36ee71947c034daf338
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-18 14:18:00 +01:00
Mårten Nordheim
88f5fc47eb Http: Start more connections faster after determining network layer
Previously we would more or less wait for the first connection to finish before
initiating more connections. This was just happening by virtue of
calling startNextRequest when a request was finished.

Since we have already determined the preferred network layer, let's just
try to start more connections. In case we are using https this doesn't
make a difference because we will try http2 upgrade first before allowing
multiple connections. Unless, of course, http2 has been disabled.

Fixes: QTBUG-120619
Pick-to: 6.7 6.6 6.5
Change-Id: Id3c3be59fd07120bff574d63481119e5ed9eb88a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-01-18 14:18:00 +01:00
Christian Ehrlicher
24a95c22fc SQLite: Update SQLite to v3.45.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.45.0

Pick-to: 5.15 6.2 6.5 6.6 6.7
Change-Id: Ibf37acf5bcee4639766d445991f5265dc78593c4
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-18 13:39:32 +01:00
Paul Wicking
c210186a05 Doc: change location of html output directory
Due to a recent change in QDoc, the outputdir path has changed.

Task-number: QTBUG-119500
Change-Id: I35bc9f79eb0cd82bbd42b39fef37204189c4a1de
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2024-01-18 11:48:03 +00:00
Marc Mutz
11d153ae1c QMetaTypeModuleHelper: suppress cppcoreguidelines-virtual-class-destructor
Says clang-tidy:

   destructor of '(unnamed struct at qmetatype.cpp:966:14)' is public and non-virtual
   in file:src/corelib/kernel/qmetatype.cpp line:966 col:14

       static const struct : QMetaTypeModuleHelper

Yes, these classes are polymorphic (because the base class is). Yes,
the destructor is non-virtual (because the base class' one isn't, but
it's also protected, so fine).

But these classes are not used as base classes, so suppress the
warning.

Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I75be86bca36a4a0e93d72acb1a0d2fe0dca1c505
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-01-18 12:48:03 +01:00
Mårten Nordheim
54824e7d2b D3D12: Fix warn-on-error for unused parameter
Amends 445fb40081c870c0a9b1c1c3cf27b20fdd36a531

Pick-to: 6.7
Change-Id: Iee3eaffcb7fbbdb3cec8020ee7c9280d52faa0a2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-01-18 12:48:03 +01:00
Laszlo Agocs
acebb97b58 Update QRhiWidget API based on review comments
Spell out some API names in enum.

Some functions are now protected.

Remove property for autoRenderTarget.

textureFormat -> colorBufferFormat.

Used "fixed" instead of "explicit" and follow
the above naming, so that explicitSize becomes
fixedColorBufferSize.

Pick-to: 6.7
Change-Id: I2fd6ad46033313a3febbb8846146021d5dd11010
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-01-18 12:48:03 +01:00
Allan Sandfeld Jensen
0e8086887a Fix FP rasterization on Win-x86
We can not guarantee 128bit alignment on 32bit windows

Pick-to: 6.7
Change-Id: I16bd3bded16bd29f4cb84b0cdf2671e4d9a19601
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-01-18 11:43:00 +01:00
Eskil Abrahamsen Blomfeldt
0d1ac449bb Fix build with -no-directwrite
QWindowsFontDatabaseBase::invalidate() was defined inside an
the declaration was not.

Since the font file loader is only protected by
QT_CONFIG(directwrite), we move it out from the previous block
and add an #if for the contents instead.

Pick-to: 6.7
Change-Id: Iedc02cceb15fe3d25d21b49af1486659a4d6373b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-01-18 08:04:08 +01:00
Thiago Macieira
c09219e946 QNetworkRequest: export the static constexpr (inline) member variables
All that is required is that we write the declaration as if they weren't
inline, like we used to for C++98 non-constexpr static members. Amends
090991123dd82796fe956e4153bc26ace22280ca.

This is required with MinGW and happens with both GCC and Clang: when a
static constexpr variable found in an exported class is used in a
context that requires getting its address, the compiler emit a DLL-
importing statement. For example:

 void f(const std::chrono::milliseconds &ms);
 void f()
 {
    f(QNetworkRequest::DefaultTransferTimeout);
 }

Emits with GCC:
 _Z1fv:
        movq    __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
        jmp     _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE

And Clang:
 _Z1fv:                                  # @_Z1fv
 # %bb.0:
        movq    __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
        jmp     _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE # TAILCALL

Pick-to: 6.7
Fixes: QTBUG-121135
Change-Id: I76ffba14ece04f24b43efffd17aae1a98071c570
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-01-17 21:50:27 +00:00
Alexey Edelev
f3305ae07c Remove the deprecated GENERATE_PRIVATE_CPP_EXPORTS argument
Remove the deprecated GENERATE_PRIVATE_CPP_EXPORTS argument from
qt_internal_add_module.

Task-number: QTBUG-117983
Change-Id: I52e6210e10a6b6207ec2a7709484eae4002d6dcd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-17 20:30:36 +01:00
Alexey Edelev
e86c24c20c Remove the use of GENERATE_PRIVATE_CPP_EXPORTS argument
Task-number: QTBUG-117983
Change-Id: Ic12e6c9daedd56f54cbde20e6bebd19f8420604c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-01-17 20:30:36 +01:00
Alexey Edelev
bd31014031 Avoid generating private cpp exports
Ignore GENERATE_PRIVATE_CPP_EXPORTS argument of qt_internal_add_module.

Task-number: QTBUG-117983
Change-Id: I03a443cb575628f3225b944316507a033d262894
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-01-17 20:30:36 +01:00