Otherwise certain features may act as enabled even though they're
not supposed to be
Pick-to: 6.4
Fixes: QTBUG-108611
Change-Id: Id4b4bcb7a8f437e2d12b2a2f9b3ce2d4463b8be8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We now only support 1.1.1+, so drop the version limitation.
Change-Id: Ife1e46c31bf6984159535b5739dd43609dcef714
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
If we assert on a different cast we may just get a different integer
value, if Tag is a sufficiently nefarious type.
Coverity-Id: 403056
Change-Id: I6e8e3883bce124b3350ad8276d88ac7ed030d982
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If I'm right, it seems that the work has already been done, and nothing
uses the `_qt_internal_wrap_tool_command` anymore.
Change-Id: Ib8a5951e8351a26df123045bb5c6001470650b38
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
don't `#include <memory>` before including the header of the user's
class(es), because the user may want to configure certain aspects of
stl/crt before including any standard headers.
Change-Id: I58f13d3604358221e3375a309eb747efecf3f990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It hasn't been used since 91f6460aff, a
commit that added support for futexes on Windows. It defines
QT_ALWAYS_USE_FUTEX.
Pick-to: 6.4
Change-Id: Ieba79baf5ac34264a988fffd172612892bd670d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
They are already slow without ASAN, and risk running into timeouts with
ASAN enabled.
Change-Id: I427b990066d8ffa838ea90a318176fbcba400852
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This allows us to check whether Qt is compiled with ASAN enabled; it is
mostly used to disable tests which are too slow under ASAN
Change-Id: I381e287c4a72ffefd4cc92850451477032ad4204
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both QStringView and QAnyStringView implicitly convert from any
container with a fitting value_type, and working std::data, std::size,
std::begin and std::end.
Add these missing operations (and complementary ones) to XmlStringRef,
so it implicitly converts to QStringView and QAnyStringView, too.
Add a check to that effect and remove the now-superfluous operator
QStringView().
Task-number: QTBUG-103302
Change-Id: I89d586cf64447a82022e06d546d7ee8339fc6dc7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The mime data object fed to qWasmClipboardPaste in qClipboardPasteTo
might have empty formats. We unconditionally check the first format
nevertheless, which leads to a crash. Avoid feeding empty mime data
to the widget system.
Fixes: QTBUG-108840
Change-Id: If874e973b742d35c16cb8a87194d9d4b8f470801
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Allows to access the wl_surface, the setCustomMargins functions and
the object corresponding to the surface role of the surface.
Also adds the xdg activation token functionality as it is needed by
another change in qtbase.
If the type passed to surfaceRole does not match the actual type of the
current surface role nullptr is returned.
QVariant is not used for transferring the surface role object because
it requires Q_DECLARE_OPAQUE_POINTER for storing and retrieving from
the QVariant. However QtWayland uses a plugin system for shell integrations
with known external plugins so it is not possible to centrally do this
for every possible pointer type. The alternative would be that plugin
and consumer delcare it both which does not make for an ergonomic API.
Change-Id: I6f4e036846485ba1895e7435bb28827b83249024
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Instead of constantly trying to find packages by calling
qt_find_package on each reconfiguration, record which packages were
found during initial configuration. Then on a second reconfiguration,
skip looking for packages that were not found on the initial
configuration.
This speeds up reconfiguration on certain platforms and repos.
Here are some stats for my macOS qtbase build.
not skip 3.69s user 4.96s system 98% cpu 8.750 total
skip 2.69s user 1.00s system 97% cpu 3.792 total
Top-level build with -submodules=qtquick3d
not skip 15.03s user 10.58s system 97% cpu 26.334 total
skip 13.87s user 5.16s system 96% cpu 19.724 total
Note this is a behavior change from how find_package is used in most
CMake projects, where if a package was previously missing, the
developer can just install the package and reconfigure to pick it up.
With this change, they will first have to remove their CMakeCache.txt
file and configure from scratch, or remove the
QT_INTERNAL_PREVIOUSLY_FOUND_PACKAGES cache variable and reconfigure.
For this reason, we enable this behavior by default only in
-developer-builds.
Builders can also opt in or out by setting the
QT_INTERNAL_SAVE_PREVIOUSLY_FOUND_PACKAGES variable to either ON or
OFF.
Note this behavior does not apply to user projects, or direct
find_package calls (as opposed to qt_find_package).
Fixes: QTBUG-107251
Change-Id: Iee9c5d120eb09e2a94eebb059a2174ef6b241e03
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Avoid using perl in CMake scripts. Remove the syncqt.pl specific
code.
Task-number: QTBUG-87480
Change-Id: I7fcd5cc83d173ec463c275b5b50b84f25044a118
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If source and build directories are located on different Windows
disks, or one of them contains a symbolic link in the path,
std::filesystem:relative is unable to calculate the relative path.
So the generated header files contain empty entries. In this cases
use the absolute file paths for include directives in the header file
aliases.
Fixes: QTBUG-108452
Change-Id: Iefc8f0ce2b54dcc31971d4a1944bf7fa55f8164e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.39
Pick-to: 6.4 6.2 5.15
Change-Id: I0113fb071d344049976953253adb4d898a1bb7c6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
So other modules can see it when they're built outside of qt5.git.
Change-Id: I76216ced393445a4ae2dfffd172a52168a2a55b4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
I've reserved the IDs for int128, uint128, bfloat16, and float128,
because the mask in qvariant.cpp's qIsNumericType() requires primitives
to be less than 64 to operate properly.
Added a QMetaType/QDataStream test to confirm it is indeed built-in.
Change-Id: I3d74c753055744deb8acfffd17247f7f57bada02
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The C++ equivalent is std::float16_t, defined in P1467[1], and is coming
with GCC 13 both in native mode (for x86, using AVX512FP16) and in
emulated mode. The C and C++ types will be the same type (<stdfloat>
simply typedefs).
qfloat16 will need to remain a wrapper with an integer member to keep
ABI with previous Qt versions. Because it is a trivially-copyable small
type, it gets currently passed in registers; the presence of the integer
member means it gets passed in general-purpose registers, while a single
_Float16 member would be passed in a floating-point register. See:
https://gcc.godbolt.org/z/8fEendjff
[1] https://wg21.link/p1467
Change-Id: I8a5b6425b64a4e319b94fffd161be56397cb48e6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This macro usage is not correct. I don't know what it is for because the
documentation next to it describes how to use it, not why one should use
it. Anyway, it's most definitely the incorrect solution for whatever
problem there may have been, so remove.
I also couldn't move it to removed_api.cpp. If I do, then the
QMetaTypeInterface created for qfloat16 misses the pointers to
QDataStream. I'm not sure why... I think it's because the operator>> and
operator<< become ambiguous, so the SFINAE to check if they exist gives
up.
Change-Id: I3d74c753055744deb8acfffd17247e1d2317f11c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This allows one to add an extra set of directories to the build, but let
the compiler know that they are system paths (that is, the compiler
should refrain from emitting warnings in code found there). This extends
INCLUDE_DIRECTORIES and is by necessity a private include set.
Will be used by qtquick3dphysics, due to its PhysX dependency.
Change-Id: I76216ced393445a4ae2dfffd1729c556db0cce3d
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
I keep getting this warning because docker-compose is not installed.
Change-Id: Id8e48e8f498c4a029619fffd172932bd86ed03ba
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Need to add the plumbing necessary to support two textures in
QOpenGLWidget and use these in the backing store. The changes
required on the RHI level is already done in an earlier patch.
Then paintGL() needs to be called twice, once for each buffer.
Also add overloads for the other functions of QOopenGLWidget
where it makes sense to query for left or right buffer.
Then finally create an example.
[ChangeLog][Widgets][QOpenGLWidget] Added support for
stereoscopic rendering.
Fixes: QTBUG-64587
Change-Id: I5a5c53506dcf8a56442097290dceb7eb730d50ce
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When calling file (RELATIVE_PATH), check if the base directory and
header path are absolute. Use the original file path if the paths are
relative to avoid critical errors.
Fixes: QTBUG-108617
Change-Id: I6daddd5c1553cdbfd965650b7c469673c62f0a3d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Using wrappers for these macros is problematic when for example passing
the -frewrite-includes flag to preprocess sources before shipping off to
distcc or Icecream. It will also start producing warnings when compilers
implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example
https://reviews.llvm.org/D49091
Now that all uses of the macros are gone, we can follow up
c3bd5ffdc8 and remove the wrappers.
Change-Id: I764aea17dcdabd420097a7f4bc0b987a53a345eb
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
We already have a category for the integrator debug information, we
might as well start using it for all warnings.
Change-Id: I13239035a334a03036611ccac49cb8c2bf9233b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... where checks for QByteArray existed before.
The checks we can't add are
- left/right/mid (legacy APIs not implemented in QBAV)
- several relational operators, d/t ambiguities. Created
QTBUG-108805 to track these.
Task-number: QTBUG-108805
Pick-to: 6.4 6.2
Change-Id: I30cc9b29a228d69d32af51234f2c28221478a75c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The description was copied from QVector, and doesn't exactly fit
QList. For QList, the behavior changed in Qt 6.0 when QList became
QVector, not in Qt 5.7, as indicated.
Be more precise.
Pick-to: 6.4 6.2
Change-Id: I4029d83128ec205f628125d78394e8ee79cc221f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's not intuitive, so check lest people break it.
Pick-to: 6.4 6.2
Change-Id: I2435cd69be7b77a6ae59cdc7b5fb99658cfc42fd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It was forgotten to assign a simple palette to this object in
1576f82721
This patch adds the missing line.
Pick-to: 6.4
Change-Id: I0acf765d9646ecc8d49791d96b5ea910e11997fe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We will need it in QML to determine which signal out of a number of
"overloads" to generate handlers for.
Task-number: QTBUG-108762
Change-Id: Ib73eeb59dbf037bd03faf0d841860d9ebc9e7032
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Some Windows SDKs seem to throw an exception from winrt::check_hresult()
We need to handle this accordingly.
Fixes: QTBUG-108605
Pick-to: 6.2 6.4
Change-Id: I14ad3b6dbd9b5fdf0120f9d3336a4d922167d169
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When QuickWindow is set as setPersistentGraphics(false) and
setPersistentSceneGraph(false), texItems' fontEngines can
become invalid with hiding and showing.
In this case, a new font engine is created but not used.
Pick-to: 6.4 6.2
Fixes: QTBUG-108300
Change-Id: I2bd759724d78cecd62666beb6fb4a01f6063cae1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Since 5ea7e3a811 we are using dark window
frames if the default palette is dark, unless applications explicitly
override dark frame support.
If the palette changes during runtime, we didn't reevaluate that
setting. Do that by handling ApplicationPaletteChange events in
QWindowsWindow. We still have to respect an explicit opt-out.
Simplify the code at the call sites of setDarkBorder(), we don't need
to check all the time whether the application has opted out of dark
frame support.
Pick-to: 6.4
Task-number: QTBUG-72028
Change-Id: I94e7d33cd21f9656ca210b43e775f487abc25b54
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The algorithms for calculating the scene's position within the view
did not compensate for scrollbars showing. The scrollbars should be
ignored when positioning hte scene within the view, as alignment
only cares about the positioning of the scene when the view is
larger than the scene anyway.
Add a test case that verifies that items don't jump up or down when
dragging horizontally, and not left or right when dragging
vertically.
Mark variables in the modified function as const where applicable to
make it easier to follow the code.
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Fixes: QTBUG-46757
Change-Id: If205637dfe124e0034f68201b23f174d6863084d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Add a style hint that allows styles to indicate that they support
dark mode. The macOS and Fusion styles support dark mode, the other
styles, in particular the Windows Vista style, do not.
Task-number: QTBUG-72028
Change-Id: I02cac2e19a21898663f50f09a4ef419a613a73ec
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Document explicitly that it is not allowed to call isSignalConnected
from (dis)connectNotify overrides, and add the respective warning from
the disconnectNotify documentation also to the connectNotify
documentation (with some light editing).
Pick-to: 6.4 6.2
Fixes: QTBUG-106025
Change-Id: I41e8a9d3e6ce697cb2943d55a7c853eeec9c1dbe
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
It was inside the Qt namespace so it would try to use it as such.
Change-Id: I8c8960e5f4758e945bef95b52247211e8f86efad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
While touching code, port iterator-based loop to range-based for.
Change-Id: I108ab4fa1e56c50f424a58984873906d37923d3d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>