/LTCG:OFF now turns off LTCG.
/LTCG:INCREMENTAL maps to UseFastLinkTimeCodeGeneration.
Unknown /LTCG:xxx values are passed to AdditionalOptions.
Pick-to: 5.15 6.2 6.3 6.4
Task-number: QTBUG-104450
Change-Id: If85942dbeec204dc2571a861a43201cb3d5993ae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This method isn't used anymore, but we can't remove it entirely for BC
reasons, because it was called from inline code.
Pick-to: 6.4
Change-Id: I9183c666c466030787ac7c2386706b50abf23eaa
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This is a repeat of commit de6ced6692
"QCborValue: fix incorrect to{Array,Map} when the value is empty" (6.4),
which fixed the same thing for QCborValue. I've just copied the exact
same implementation onto the QJsonValue functions.
Pick-to: 6.2 6.3 6.4 5.15
Fixes: QTBUG-104085
Change-Id: I175efddd75f24ae59057fffd16f6b257bf7ed36d
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
It can actually be undefined, so test for that before checking
the object type.
This fixes the asyncify build.
Pick-to: 6.4
Change-Id: I5a6a0bc60c153290c35c20242400c59cd1312403
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
We don't need QByteArrayData any more (since 6.0).
[ChangeLog][Potentially Source-Incompatible Changes] moc no longer emits
an #include for QByteArray in the output file. None of the content that
moc generates needed that header, so this should not cause changes for
most people. However, codebases that #include'd the moc output
(something that is recommended) could be depending on this indirect
include.
Pick-to: 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f9cf13dc8d61b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
It contains more than one size.
Drive-by drop the const from the structure, so it becomes properly
trivial (though there's disagreement, see[1]).
[1] https://conformance.godbolt.org/z/rK1xW669K
Pick-to: 6.2 6.3 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16f9cc69ffd90aa4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
- USE_WEBGL2 is depreciated, Emscripten now uses MAX_WEBGL_VERSION
- Optimize and remove use of emulated ES2 and ES3, which means
only use WebGL friendly subset.
Users can add USE_ES3=1 and USE_ES2=1 to the final linker arguments
for those respective versions in order to enable using
glDrawArrays and glDrawElements with unbound buffers.
See https://emscripten.org/docs/porting/multimedia_and_graphics/OpenGL-support.html
Pick-to: 6.4
Change-Id: I11ae359966964b3e7aa6e61ccc714c2bfbf61f96
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The documentation for both gui and widgets defines members of the
"helpsystem" group, which definition is given in qthelp.
Due to recent changes in QDoc that automatically link a class page to
its owning group, it is now required for those project to be dependent
on qthelp, so that it is possible to retrieve the necessary linking
information for the group definition.
Hence, such a dependency was added.
Change-Id: Id9399e76bbe10fb9ae0c05d637006b5cdc0b742b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There's currently no statistically-significant difference between the
two, due to a huge pessimistion in QTestLib where every QCOMPARE* and
QVERIFY writes 1KiB of data onto the stack before doing anything else,
so I'm not reporting numbers in this commit message.
Pick-to: 6.4
Task-number: QTBUG-98873
Task-number: QTBUG-98874
Change-Id: I233878596f0a8fe6b96360adb839fecd72c398a2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The variable was misspelt, so we obviously don't need these
exceptions.
Pick-to: 6.4 6.3 6.2
Change-Id: I691c9315bcde3aad72410ce01ae6dc6a013ee6fd
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
We have now had several requests for inlining previously-exported
member functions, but no standard mechanism to effect it.
As QT_REMOVED_SINCE has shown, there is great value in having such a
standard mechanism, so here is one.
With this change, to inline a previously exported (member) function,
simply
- mark the declaration with QT_<MODULE>_INLINE_SINCE
- move the definition into the header file (outside the class),
- wrap it in QT_<MODULE>_INLINE_IMPL_SINCE
- #include the header into the module's removed_api.cpp
Just including the header into removed_api.cpp is enough, so you may
want to add a comment:
#include "header.h" // uses QT_<MODULE>_INLINE_SINCE
The effect is as follows:
- A TU in a _different_ library will see an inline declaration,
followed by the definition, and so it will see a normal inline
function.
- A TU in the same library will, however, see a non-inline
declaration, to avoid the ODR violation that at least GCC/ld are
able to detect.
- When QT_<MODULE>_BUILD_REMOVED_API is in effect, the TU will also
see the definition, which is the same setup as before the change,
except in a different TU, and therefore export the member.
- When, OTOH, QT_<MODULE>_BUILD_REMOVED_API is _not_ in effect, the
TU will see no declaration, assuming (correctly), that the
definition will be supplied by a different TU.
This is, of course, an ODR violation, but not worse than what we do
elsewhere, as the definitions differ only between library and user.
The function is inline only for the users of the library, not the
library itself, which will still see the function as non-inline. If
inlining is critical within the library, too, the existing function
should call a new inline function, and calls in the same library should
be changed to call the new inline function instead.
Use the new mechanism to inline the QLocale ctor we intended to inline
for 6.3, but couldn't, because we hadn't found the magic incantation,
yet. Thiago found it a few weeks later, and this is what this patch is
based on.
Fixes: QTBUG-100452
Pick-to: 6.4
Change-Id: Ia0030cddc64b6b92edfed860170d5204aa74b953
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
While in a private header, it did manage to place QList<QPostEvent>
operations near the top spots of all Qt template instantiations in a
QtWidgets build.
Task-number: QTBUG-97601
Pick-to: 6.4
Change-Id: I4fa1972b8764b71ad0559633131e7e44b3d4ae6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If, for whatever reason, BOOST_NO_EXCEPTIONS is defined, the user of
the Boost libraries is supposed to provide a definition of
boost::throw_exception, which we didn't.
We used to run into this only on ubsan builds, but it seems we now
have the problem on a regular Ubuntu 22.04 build, too (cf. bugreport).
Fix by adding the necessary definitions.
Fixes: QTBUG-104083
Pick-to: 6.4 6.3
Change-Id: I9b061a158a5b77e8d286bd7b40312e5bc63ee8de
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
If the QFuture is canceled because the associated QPromise has been
destroyed, we still need to run its continuations (i.e. onCanceled
handler, if it's attached), so replaced the cleanContinuation() call
inside ~QPromise() with runContinuation(), which will also take care of
cleaning the continuation.
[ChangeLog][QtCore][Important Behavior Changes] QFuture now runs its
continuations when its associated QPromise has been destroyed.
Previously, if a QFuture was canceled because the associated QPromise
has been destroyed, its continuations were skipped.
Fixes: QTBUG-103992
Pick-to: 6.4 6.3 6.2
Change-Id: Ie05bc760c96c349aade8adb8d2fe5263aff8efac
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
http2protocol_p.h is not supposed to be used without the http feature
is enabled. Move its include under QT_CONFIG(http) guard.
Change-Id: I374dd84d3330de2b4c340b9803d0c3d2c13bc8e3
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This makes header files self-contained and reduces the number of
'sources of truth' for syncqt procedure.
Change-Id: I7f5865abc69934603139d23e1b5452da46ccb110
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move public ssl headers to the general QtNetwork sources since they
supposed to be used across the project without corresponding checks
for the FEATURE_ssl presence. The content in these header files has
a conditional implementation guarded by corresponding macros.
Change-Id: I43168469da27321c2d8064ec2e5d7fe31126ebec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Threads header files are used across the project without the check for
FEATURE_thread enabled. So moving them out of the FEATURE_thread
condition in CMake file to make them part of the CMake source tree
even if FEATURE_thread is disabled.
Change-Id: I8ee4ee5ffa16054b9af0df0aa5704b0f87678e1a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also add support to expandable/expanded states to QAccessibleComboBox
in widgets. QtDeclarative will still require updates so that QML combo
boxes report the expanded/collapsed state and react to UIA actions.
Task-number: QTBUG-103591
Pick-to: 6.4 6.3
Change-Id: Iff8ba5e3143778ce17998dbe7f5f76cae658dc19
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The useless-cast gcc warning is disabled in the files generated by
the moc. A typical warning is like
using_t = void(Counter::*)(int );
if (*reinterpret_cast<_t*>(_a[1]) ==
static_cast<_t>(&Counter::valueChanged)) {
*result = 0;
return;
}
Removing the static cast results in a compilation error
"address of overloaded function with no contextual type-of
information" in moc_myobject.cpp files.
Checking whether we have an overload set or a single function
might be too much effort for too little benefit and may not worth
it.
Fixes: QTBUG-71938
Change-Id: I6f67e163a3493b51fb95f54218ce6bf9a302f824
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
qt-module-defaults-online.qdocconf includes online-specific overrides
for some of the documentation macros. This needs to happen also in
the commercial template to have equivalent behavior.
Pick-to: 6.4 6.3
Change-Id: I2ca3246fbf16cef502e8eada056df6e8db573d5d
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
The API is deprecated, but the documentation does not state that.
Fixes: PYSIDE-1750
Pick-to: 6.4 6.3 6.2 6.1 6.0
Change-Id: I038ffeb958312d7648690743e06598a15dfb4cbc
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
'androiddeployqt' supposed to copy artifacts that may not have
abi-specific identifies. One example is Qt6Android.jar file. We need
to prevent execution of multiple androiddeployqt instances in
parallel. External projects now are divided into two steps. The
first runs the build and can be executed in parallel to the build
steps from the other external projects. The second one triggers
androiddeployqt and can only be run exclusively in relation
to the similar steps from other ABI-specific external projects.
To solve the issue we build the dependency chain between the all
ABI-pecific qt_internal_${target}_copy_apk_dependencies targets to
execute androiddeployqt sequentially. This is non-optimal, but
guarantees that androiddeployqt is not running simultaneously with
another instance in external projects.
Pick-to: 6.3 6.4
Fixes: QTBUG-104013
Change-Id: I39a25dd5f38ed988e0ca74b185024bc602ab81a1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- Make it explicit that each chapter can be run as a stand-alone test
application
- Add a CMake section on how to build the executable
Task-number: QTBUG-103730
Pick-to: 6.4 6.3
Change-Id: Id4c87c454521f698dcf16cfdc176318dd3e16786
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
QXcbConnection::sync is a full equivalent of calling XSync with false,
they both are sending GetInputFocus request and getting its reply
Pick-to: 6.4
Change-Id: I4f91b9447a02def41a8693a54312856b56e74811
Reviewed-by: Liang Qi <liang.qi@qt.io>
For example, when having virtual monitor which includes two real
monitors, the primary information in xcb_randr_monitor_info_t
is normally false, because user can only set it for output.
Kudos to Jiang Wu for his first patch and details of the issue.
Done-with: Jiang Wu <wujiang@kylinos.cn>
Pick-to: 6.4 6.3
Change-Id: I6af443ff69d347a6d86efc9c8ea7a5d18f4c3e24
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Jiang Wu <wujiang@kylinos.cn>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Regression introduced in 9a4c98e556:
m_cursor is not initialized and never set when monitorInfo is not
available in QXcbScreen::setMonitor. This seems to happen when running
in VNC, e.g. on a Raspberry Pi.
This usually results in crashing the application pretty soon.
Using a unique_ptr solves both the initialization and a possible leak
when setMonitor is called multiple times.
[ChangeLog][Linux/XCB] Fixed crash when no monitorInfo is available (e.g. VNC).
Fixes: QTBUG-104443
Pick-to: 6.3 6.4
Change-Id: If13493c177121a1994b5d00dfbd64f1da694df2e
Reviewed-by: Liang Qi <liang.qi@qt.io>
...instead of next to the import library.
If separate_debug_info is enabled then we would create an install rule
that puts the .dll.debug file next to the .a file. GDB however expects
the file to be next to the .dll.
Fix the installation rule in separate_debug_info.prf accordingly. This
affects the MinGW packages of Qt 5.15 and user projects targeting MinGW.
Pick-to: 5.15 6.2 6.3 6.4
Fixes: QTBUG-86790
Change-Id: If91c356e7e7f7f4330ebc43691e414929f9beb4b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Now that QStringConverter can handle non UTF encodings through ICU,
add a way to get a decoder for arbitrary HTML code.
Opposed to QStringConverter::encodingForHtml(), this method will
try to create a valid string decoder also for non unicode codecs.
Pick-to: 6.4
Change-Id: I343584da1b114396c744f482d9b433c9cedcc511
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clang with -march=tigerlake or -march=sapphirerapids pre-defines
__SHSTK__, which QtCore require the feature, even if the OS does not
have support for it. That's of no consequence because the compiler does
not generate shadow stack operations on its own.
Pick-to: 6.2 6.3 6.4
Change-Id: Id0fb9ab0089845ee8843fffd16fa1ad910f008b8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
According to https://www.w3.org/TR/REC-xml/#NT-Char unicode characters
within the range of [#x10000-#x10FFFF] are considered to be valid, so
fix the check for valid characters accordingly. This requires changing
the loop over the input QString to iterate over code points (instead of
code units).
Fixes: QTBUG-104362
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I7dcf5cad05265a54882807a50522d28b647e06ee
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
When assigning the lambdas directly to a function_ref their lifetime is
limited to that of the expression. Store them on the stack first to
avoid the UB.
Fixes: QTBUG-104419
Pick-to: 6.4
Change-Id: I3c85ac683b0bd7768b646dc9d0a1ed4dd173e6f3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
qt6_add_big_resources works by calling rcc to generate a resource
.cpp file, compiling it into an object file, then passing the
compiled object file to rcc again for further manipulation.
The path to the object file is passed to rcc using the
$<TARGET_OBJECTS> generator expression.
This generator expression does not work when used in
add_custom_command / file(GENERATE) when targeting iOS, because
CMake claims it does not know where the object file will be on-disk
(presumably because the location is controlled by Xcode itself and it
can vary based on the active architecture and sysroot).
The following error is shown at generation time:
Error evaluating generator expression:
$<TARGET_OBJECTS:rcc_object_foo>
The evaluation of the TARGET_OBJECTS generator expression is only
suitable for consumption by CMake (limited under Xcode with multiple
architectures). It is not suitable for writing out elsewhere.
More details about the issue can be found at
https://gitlab.kitware.com/cmake/cmake/-/issues/20516
Trying to work around the issue by manually invoking the compiler
instead of using a genex so we know the location of the object file
hits similar issues in that we don't know the active arch and sysroot
for which to compile the object file.
Until the CMake limitation is lifted or we find a different fix, warn
that qt6_add_big_resources can't be used when targeting iOS and
fall back to using qt6_add_resources instead.
Note that qmake CONFIG+=big_resources also falls back to non-big
resources mode when targeting Xcode (mac-xcode) and doesn't even show
a warning.
Another note is that using CMake + Xcode + qt6_add_big_resources does
work when targeting macOS, although it generates some warnings
warning same member name (qrc_assets.o) in output file used for input
files: qrc_assets.o qrc_assets.o
(due to use of basename, truncation, blank padding or duplicate input
files)
So there is some hope this could be fixed for iOS in the future.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-103497
Change-Id: I91152247651ecd35e8110b8874399cb1b8b394bd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
QGraphicsItems may override itemChange to prevent certain attribute
changes. Overriding ItemSelectedChange this way is explicitly documented
to be allowed.
However QGraphicsScene::clearSelection did not test whether items were
in fact deselected after the call to setSelection, and always cleared
the stored set of selected items.
Fix this by checking the actual selected state of the item as we iterate
over them, and store those items that are still selected in a set that
becomes the new selectedItems set (which will be empty if no item
overrides, which is the default).
Add a test that also checks that clearing the selection emits the
selectionChanged signal correctly (and does not if all selected items
block being deselected).
Fixes: QTBUG-85474
Pick-to: 6.4 6.3 6.2
Change-Id: I665afc132876e02e6e1061b7be37f4f6e4be418f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Set it to nullptr on clear, and deal with possibly null bindingStatus.
Task-number: QTBUG-101177
Task-number: QTBUG-102403
Pick-to: 6.4
Change-Id: I66cb4d505a4f7b377dc90b45ac13834fca19d399
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In combination with EGL_EXT_platform_xcb support, this allows xcb_egl
to be used without xlib. Without EGL_EXT_platform_xcb support, this
still reduces amount of code using xlib.
Pick-to: 6.4
Change-Id: I29e2b29f7ef8ea34320887f62697f84232b86fba
Reviewed-by: Liang Qi <liang.qi@qt.io>
In a lambda, capturing of `*this` by reference via `=` is deprecated,
and breaks the build. Capture everything needed instead.
Amends fb981a0954.
Change-Id: I5d3d192e71662b96154cb5979898277bd0720a90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In a lambda, capturing of `*this` by reference via `=` is deprecated,
and breaks the build. Capture everything needed instead.
Amends e7477e8934.
Change-Id: Ibdbf51cb7a5ec54004b14b719dfd44e86d6f0893
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>