Since compilers don't provide such macros, do it ourselves.
In order to test these macros, add ad-hoc specializations of
QTest::toString() for qint128 and quint128 locally to the test. Turns
out it's not too hard to write them, so we might move them to a public
header, yet.
Pick-to: 6.6
Change-Id: I1483f3af2ccec6038e1c780649f9ffe413bb59ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Check that QIntegerForSize<16> and std::numeric_limits<quint128> work
and that q(u)int128 are available in C mode, too.
Pick-to: 6.6
Change-Id: I44af8282399c78f6e74a8268af53bad64407ca34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Instead of checking that all the features be present if any of them are
-- which is not an acceptable proposition, because each of them were
productized in at least one processor before -- let's simply insist that
they all be present if AVX2 is. That's what we can guarantee: all AVX2-
capable processors are capable of:
- AVX and earlier SSE (architecturally implied, so not checked)
- BMI1
- BMI2
- F16C
- FMA
- LZCNT
- POPCNT
This restores the original set of features that were checked in commit
ad65bbe4c0 when this was introduced, but
only if AVX2 is set. It also POPCNT, which was introduced with the
Nehalem architecture (which matches x86-64-v2) but aren't implied by
AVX.
GCC's -march=x86-64-v3 implies CRC32, but -march=haswell does not
because there were SKUs lacking CRC32, AES and PCLMULQDQ. This is
probably a bug in GCC.
Fixes: QTBUG-116357
Task-number: QTBUG-111698
Task-number: QTBUG-107072
Pick-to: 6.5 6.6
Change-Id: Ifa1111900d6945ea8e05fffd177e113eaa506dde
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There were two problems:
- On platforms where QFLOAT16_IS_NATIVE == true, a qHash(qfloat16{})
call has become ambiguous between the three FP qHash() overloads
(float, double, long double), where it was unambiguously calling the
float one in Qt 6.4. This SiC was caused by the replacement of
operator float() by operator __fp16() in
99c7f0419e, which is in Qt 6.5.
- On platforms where QFLOAT16_IS_NATIVE == false, qHash(qfloat16{})
would produce a different value from qHash(float{}), and therefore
Qt 6.4, when the seed was != 0, because the former would go via the
one-arg-to-two-arg qHash adapter while the latter one would
not. Since participating functions are inline, this causes old and
new code to produce different hash values for the same qfloat16,
leading to a BiC possibly corrupting QHash etc.
Fix both by adding an explicit qHash(qfloat16). This function is
inline, so it doesn't add a new symbol to 6.5.x.
[ChangeLog][QtCore] Fixed qHash(qfloat16) which was broken from 6.5.0
to 6.5.3, inclusive. If you compiled against one of the affected Qt
versions, you need to recompile against either Qt 6.4 or earlier or
6.5.4 or later, because the problematic code is inline.
Pick-to: 6.6 6.5
Fixes: QTBUG-116064
Fixes: QTBUG-116076
Change-Id: Id02bc29a6c3ec463352f4bef314c040369081e9b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Let's find needle and then do detach
While touching code, replace raw loop with algorithm
and add early out: compare before and after args
Change-Id: I22403fd3d6920d941b65e79f44b46e49a9777dc5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Let's find replaceable chars and then do detach
Change-Id: I4a4360d73a97af2388f4f2f284949ffcfbc48836
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The `emscripten_main_browser_thread_id()` has been deprecated
in favor of `emscripten_main_runtime_thread_id()`.
Using the deprecated one generates a warning during compilation.
Change-Id: I1154bd8ff78f13e6425fdc65ac39763569360da6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Generate the missing deprecated header in the framework directory for
the cross-module deprecation case.
Amends 7e84a04563
Pick-to: 6.5 6.6
Change-Id: Ibb2d262e41c6de7dfb34c39cabd6b19c43aa9636
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Call close explicitly to avoid any issues related to non-closed file
descriptors.
Pick-to: 6.5 6.6
Change-Id: I02df30032dc04afd5d135d707eff4a6efe6a3ea5
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Wrap the directory creation logic with try/catch to handle possible
file system exceptions.
Pick-to: 6.6 6.5
Change-Id: I11ad4552dccfdc8cc8a4ec4912d0a15d0f9557c6
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
QWindow::setMask() is not guaranteed to turn the masked out areas
transparent, and it's up to the client to ensure this during
painting.
Pick-to: 6.6
Change-Id: I1155b3ad095152a993532f2290cacb670e20daa7
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The event might come from a partial expose, but we want to
fill the entire bounds of the window, as we're filling with
a gradient.
Pick-to: 6.6
Change-Id: I66cedb160fb0ed06935c06ba2fe5dec9ed468833
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
This makes function declarations much easier to read.
Change-Id: Ib05433cda97a39f4a3b8c2759c32309a60716bfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This gives more information than an int, also simplifies the code
slightly.
Change-Id: I76c00230386d74c70d294e638b4927de883f03ff
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
FindWrapOpenGL.cmake assumed that IMPORTED_LOCATION is the absolute path
of the library within the framework. That's not the case with CMake 3.28
anymore. There, IMPORTED_LOCATION is the absolute path of the framework
directory.
The relevant upstream CMake change is
6b01a27f901b5eb392955fea322cde44a1b782a3.
Pick-to: 6.2 6.5 6.6
Change-Id: I6b702a28318e0978c56dec83c398965aa77ef020
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The documentation for QPalette::accent had been missed and its updated
as part of this patchset.
Amends patchset 17c589df94.
Fixes: QTBUG-116930
Pick-to: 6.6
Change-Id: Iaa53e15dbecaa3c741e2db013c96b4424be39e91
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Amends e7477e8934.
Do not call QWindow::resize() on changing min/max sizes if
bounded window size has not changed. Otherwise it may unexpectedly
reset window's state on some platforms, like Windows and Linux.
Fixes: QTBUG-115699
Pick-to: 6.5 6.6
Change-Id: I217ca3fd854a1f41d6df312e3258734d1d3bce45
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Visualize what's going on with tst_QTextCursor::insertMarkdown() at least.
But this could be expanded for other purposes.
It's also interesting to test drag-and-drop with this. And you can save
the result to any supported text format.
Change-Id: I363c32ff9b1bd7c53c562b08c58de95a69be0aa9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Error is the default for this option in ld64, and with the new linker
in Xcode 15 the option was deprecated, causing a warning, so let's just
skip adding it and assume undefined symbols results in errors.
Fixes: QTBUG-116732
Pick-to: 6.6 6.5
Change-Id: I736a891ae102fe1dfb2cdf869f42c665e231adba
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add mobile example category tags for the chosen examples.
Add for the ones that work best for both, Android and iOS.
Remove from the ones that do not work for both (at least yet).
Added
- hellogles3
Removed
- qtandroidnotifier (not iOS)
Fixes: QTBUG-116780
Pick-to: 6.6
Change-Id: Icb4c7ba1f22d4e67089a565071d83cdf8ec95896
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
use std::nothrow more
Change-Id: I7c681089777e86a31db2fba831362771e6607496
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Specifically, prune it to fit on a single line.
Much of what it was saying was implicit in its context already.
It also neglected to mention CBOR's part in the story.
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I161a345cbbea8b706490fcbbadecd01b8946af31
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
In the documentation of the TagSeparator parameters of three QLocale
methods, I neglected to mention they were added at 6.7. This amends
commits 91e70f239e and
15cfdab514 in which I added these
parameters.
Change-Id: I11462b88305255359d4e9b144b000cffe9a142ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Fix the following QDoc warnings:
* warning: Can't link to 'QRhiWidget::sampleConut'
* warning: Can't link to '`Q_NODISCARD_CTOR'
* warning: Invalid '\relates' (already a member of 'QEventLoopLocker')
* warning: Unknown command '\relatesalso'
* warning: Undocumented parameter 'separator' in QLocale::name()
* warning: clang couldn't find function when parsing \fn void QRhiWidget::framePresented()
In QAtomicPointer, work around the issue of QDoc not supporting
multiple \relates command for a single topic by adding a see-also
link to the global qYieldCpu() function.
Document the qvariant_cast() overload taking an rvalue reference.
Change-Id: I2528eee666149a97a14be059bbed537636d7aa0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Just re-use the private functionality present elsewhere. As a drive-by
fix this will also properly separate the individual points with commas,
making the output readable again.
Before:
> QPolygonF(QPointF(0,0)QPointF(93.75,0)QPointF(93.75,62.5)QPointF(0,62.5))
After:
> QPolygonF(QPointF(0,0), QPointF(93.75,0), QPointF(93.75,62.5), QPointF(0,62.5))
Change-Id: I0cf0408bfb2fe72974e4dbd5d2958c5a2aa56b5f
Pick-to: 6.6 6.5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Slots like (un)registerServiceNoLock() modify shared state and
should be run with write lock taken. Having only read lock results
in hard to reproduce crashes.
Task-number: QTBUG-116621
Change-Id: I4456b64f9f2200378012822143e1a05345859d62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Do the same for the derived classes.
Change-Id: Ieec1d222a96775d57af91f9c6757648561b75e53
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This class is reference counted, having a parent would
interfere with this reference counting code.
Change-Id: I5ab4fdfa74af94d8b760bd3600bd1f828e3d2b91
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The \generate list names are added for each categorized section with
some explanation. Here, calling the overviews as
explanations-(name of the section). The idea is to give general terms
instead of specific phrases like 'core' etc, for better understanding.
Task-number: QTBUG-115347
Pick-to: 6.5 6.6
Change-Id: I673e38c0e9193b7f7d54008bfcf82c2d3a10be3f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
0b421fa58b9a73d657bf17834788fd1175c4767e ensured a correct focus chain,
when buttons in a QDialogButtonBox were hidden.
The implementation did not check, if a hidden button was added via
setStandardButtons(). In consequence, it was removed from the
standardButtonHash and never added again.
QDialogButtonBox::button() returned nullptr for a standard button,
once it had been hidden. That introduced a regression.
This follow-up patch makes sure, a standard button is not removed
from standardButtonHash, when hidden. By no longer removing it from
standardButtonHash, it makes showQDialogButtonBox::button() always
return the pointer to the standard button, even if it is hidden.
The function handleButtonDestroyed() used the argument
QDialogButtonBoxPrivate::RemoveRule::KeepConnections, in order to leave
signal/slot connections untouched. It expected the the destroyed button
to be removed from standardButtonHash. In order to retain that
functionality, the enum class RemoveRule is renamed to RemoveReason,
and one value was added. QDialogButtonBoxPrivate now handles all
necessary cases of removing a button:
ManualRemove (previously Disconnect):
- remove button from roles
- remove button from standardButtonHash
- disconnect all signals
LeaveEvent (previously KeepConnections):
- remove button from roles
- do not remove button form standardButtonHash
- do not disconnect signals
Destroyed (new):
- remove button from roles
- remove button from standardButtonHash
- do not disconnect signals (QObject will do that)
An autotest is added to tst_QDialogButtonBox.
Task-number: QTBUG-114377
Pick-to: 6.6 6.5
Change-Id: Ib28625d44fa89c3d06f181f64875c2e456cebbfa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Fix code lines that do not respect the 100 characters limit rule.
Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: Idbc148b77b52a359d972233c977bbf2ccf9fcd24
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Create QString at compile time using the literal operator""s instead of
using pointers to characters. This way, no conversion or allocation will
occur at runtime.
Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: I4fb51d74abbbfa08fb9fddfa90d8afcebd82a7e2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reorder the includes following the coding conventions.
Remove unneeded includes.
Add needed includes to avoid Transitive includes.
QGestureEvent is passed by a pointer in the gestureEvent method in
mandelbrotwidget.h. So, we do not really need to include the header.
Instead, forward-declare QGestureEvent class in a namespace.
Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: I48cfd663bf98350281ef7f31e6c0ef3e301a08ca
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>