| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The input data is integral. So keep using integral types for as long
as possible and only convert to float when performing a calculation
that requires fractional results.
This avoids the need for qFuzzyCompare(), which has a pre-condition
that neither of its argument must be zero, which an RGB value cannot
guarantee.
Here is why this works:
The old code immediately scaled the r, g, b values from 0...USHRT_MAX
to 0..1 float values. So, r, g, b, min, max, and delta variables were
rescaled. The new code doesn't scale said variables. So fractions
(like `delta / max` or `(g - b) / delta` remain mathematically the
same (and numerically, too, if the division is done in FP), and so
both `hue` as well as `saturation` don't change value.
There's another copy of this code that needs the same treatment (for
HSL), but they are sufficiently different from each other to take that
in a follow-up patch.
Also:
- Move the assertion into the third leg of the if-else chain. Now that
we use precise integer arithmetic, it cannot happen that none of
r, g, b are equal to max({r,g,b}), so if it wasn't equal to r or g,
it must be equal to b. This allows us to leave `hue` partially-formed,
so the compiler can warn about it being used uninitialized.
- clean up overparenthesization, whitespace and make the individual
legs of the if-else chain look more similar by using an explicit 0
literal in the first
Drive-by changes:
- use std::minmax(initializer_list) instead of our own Q_MIN_3/Q_MAX_3
macros (the macros can't be removed, yet, as they're still used in
toHsl()).
- reduce the scope of `delta`, after replacing the check for 0 with an
integral one
As a consequence of using less FP arithmetic, tst_bench_qcolor's
toHsv() runtime goes down from 230ms (best-of-10) to 160 (ditto), a
whopping 40% reduction.
Amends the start of the public history.
Pick-to: 6.11 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I370e8a214e48479b0c6fd0e48eb8f43c66920103
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
...so static code checkers will not complain about ignoring
remainders or fractional parts of the division anymore.
Change-Id: If57e1d3a9229424ac382c5f1f6aee8ddba481714
Coverity-Id: 898602
Coverity-Id: 898603
Pick-to: 6.11 6.10 6.8 6.5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Resolves multiple QDoc warnings of type "No output generated for X::Y
because X is undocumented."
Pick-to: 6.11
Task-number: QTBUG-141665
Change-Id: I6a597f6979151565fcee36964f892976964be75d
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Qt Gui documentation refers to a number of types/topics from the
Qt Quick Controls module, add it as a documentation dependency to
fix linking issues.
Pick-to: 6.11 6.10
Change-Id: I541cc637c6de1daa822609ab596f82adfc0f9e45
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
-Some URLs give 404
-Some bugreports were resolved in Qt 5.1x
-Some URLs no longer referenced in Qt 6
Task-number: QTBUG-142088
Pick-to: 6.11
Change-Id: Ic4ae92b3f74ce6f62484453b8943d6b149269bc3
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
QPP::Element::operator QPointF() uses QPointF in-size, so don't rely
on transitive includes.
Amends the start of the public history.
Pick-to: 6.11 6.10 6.8 6.5
Change-Id: Ib11998d62acc38f6c7dbb5b0ebe9ceb3bcf32a4f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 6.11
Change-Id: I0b2bf2983edb2f95b134f6812dab05bc633b52fc
Reviewed-by: Zhao Yuhang <2546789017@qq.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
We cannot use QGuiApplication::is_app_running or
QGuiApplication::is_app_closing since these flags
have not been set yet.
Fixes: QTBUG-142552
Pick-to: 6.11
Change-Id: I612b50090c148e294ee8cf693ac0ff29921ad3c7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
| |
|
|
|
|
|
|
|
| |
The SVG is not a direct conversion, but aims to convey a bit more
information about the coordinate systems in use.
Change-Id: I4465935285cd5cae7d6f0fb8760d2773ac25d6aa
Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
Reviewed-by: Jerome Pasion <jerome.pasion@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
EGL_EXT_create_context_robustness says that on GLES GL_EXT_robustness
is required - indeed the nvidia driver only exposes the EXT variant
on GLES. Without this a context with reset notification is created
but it's not reported via its format, this has impact when further
contexts sharing with it are created which need to match its robustness.
Pick-to: 6.11 6.10
Change-Id: I4d78a885777e8318d4a029849af4e6ad15de402f
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing the RasterGLSurface type seems to have a side effect
for eglfs, although the root cause is pre-existing, strictly
speaking.
Widget applications stop working completely due to makeCurrent()
and swapBuffers() complaining about the type being RasterSurface.
Previously this was RasterGLSurface and so there were no complaints.
Now that the type for top-level widget windows is RasterSurface, and
considering that a platform like eglfs is still going to render
with OpenGL onto such a surface regardless what surfaceType says,
the test QOpenGLContext uses for those warnings and bail outs should
be expanded.
Conveniently enough, there is an existing OpenGLOnRasterSurface
capability in QPlatformIntegration, reporting exactly what we
want, eglfs being the platform reporting it as true. Use it.
Technically this should have been there before, but RasterGLSurface
masked this inconsistency until now.
Change-Id: I2523cd79e480571a26af9d31a1a431f71db078d6
Fixes: QTBUG-142538
Pick-to: 6.11
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the first patch fixed the obvious issue of lexicographically
comparing an unordered container, this one might or might not fix
something.
But this author requires the peace of mind of having a known-good STL
algorithm do the heavy lifting instead of being forced to analyze a
raw loop, so this patch replaces said raw loops (and the suspicious
size check that preceded them) with std::lexicographical_compare()
calls, which, despite its name, implements op< semantics, and is
proven by way-more-capable programmers than yours truly (i.e. Alex
Stepanov and David Musser) to yield a strict weak ordering when the
parametrized comparator is one (which it is, in this case,
recursively, as std::pair's op< is also defined to use lexicographical
ordering).
As such, it's only now that I feel comfortable in saying that this
operator is a strict weak ordering again.
[ChangeLog][QtGui][QFont] Fixed a Qt 6.7 regression in the stability
of the less-than operator. If you use QFont as keys in a
QMap/std::map, or otherwise use QFont ordering (equality is ok), then
we strongly recommend to update.
Amends 6160ea45b689e9d26795a18f155053ac4dc4dd6b.
Pick-to: 6.11 6.10 6.8
Fixes: QTBUG-142246
Change-Id: I1c96289af9326c7020f67674c148beca78791304
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable VK_EXT_device_fault when available and resolve
vkGetDeviceFaultInfoEXT. When a VK_ERROR_DEVICE_LOST is detected, query
the device fault information and log the fault description, address info
and vendor info blocks.
This makes Vulkan device loss errors more actionable when the driver
supports VK_EXT_device_fault, while keeping the behavior unchanged
otherwise.
Example log:
vkDebug: vkWaitForFences(): Returned error VK_ERROR_DEVICE_LOST.
Device loss detected in vkWaitForFences()
VK_ERROR_DEVICE_LOST (VK_EXT_device_fault): 71 address infos, 0 vendor
infos, 0 bytes vendor binary: n/a
AddressInfo[0]: type=INSTRUCTION_POINTER_UNKNOWN addr=0xdf7dff1360
precision=16
AddressInfo[1]: type=INSTRUCTION_POINTER_UNKNOWN addr=0xdf7dff1240
precision=16
AddressInfo[2]: type=INSTRUCTION_POINTER_UNKNOWN addr=0xdf7dff12f0
precision=16
(...)
Graphics device lost, cleaning up scenegraph and releasing RHI
[ChangeLog][RHI] The QRhi Vulkan backend now uses the
VK_EXT_device_fault extension, when available, to log detailed
information on VK_ERROR_DEVICE_LOST.
Change-Id: Idfdff026d718724e2b39f348957649f3894aaadb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While one can hope that the release-mode optimizer will figure out
that no initialization is needed, the unnecessary initialization of 64
(float[4][4]) or 128 (double[4][4]) bytes will be most pronounced in
debug modes, the speed of which some developers care about.
So add Q_DECL_UNINITIALIZED to all Qt::Uninitialized QMatrix4x4
constructor calls, as well as to all result arrays for copyToDouble().
The latter, at least, could be changed to return a nested std::array
of doubles, but with the addition of -ftrivial-auto-var-init=pattern
(or in C++26 builds), Qt::Uninitialized completely lost its meaning,
at least outside of QString/QByteArray, so the QMatrix4x4 ctors cannot
be centrally fixed.
Amends 9ff1e6d80bbd5b44b9ec4c0a837d9a4c962698e4.
Pick-to: 6.11 6.10 6.8
Change-Id: I6ffdaf7075dabac41fc3d7078dc6ded5e7a0d641
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Saw this elsewhere in QMatrix4x4 source code, found it useful, so add
it here, too.
Amends 13b3545e833f6175f686c9776e1510db3f3f11eb.
Pick-to: 6.11 6.10 6.8
Change-Id: I9e3162d8f9ca081b9213c93cafef962e0449b4e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that both branches of the if use the same constructor, we can
drag the constructor call to the top of the function, bringing the
function into a form that lets NRVO kick in on all known compilers.
Fixes GCC -Nrvo.
Amends the start of the public history.
Pick-to: 6.11 6.10 6.8
Change-Id: I7b500114e29faa7c6ab44622f0975b869f2ad7e2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of copying the LHS operand into the result and selectively
overwriting fields whose values are not statically known for scaling
and translation, write the known values into those fields manually.
This allows us to use the Qt::Uninitialized constructor, like in the
3D case, which, in the last step, will allow us to re-enable NRVO in
this function.
It should also improve numerical stability, because it resets what
might have become merely fuzzily-0/1 values to known, clean ones.
Amends the start of the public history.
Pick-to: 6.11 6.10 6.8
Change-Id: I595498787cebe069c36c1797a9dbe1a94780066d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
After de-coupling the first three lines of the 2D case from the
following three lines in step 2 of this patch series, we can now
re-order the lines so (the explicit) writes happen in memory order
here, too, like in the 3D case.
Amends 13b3545e833f6175f686c9776e1510db3f3f11eb.
Pick-to: 6.11 6.10 6.8
Change-Id: I1f58a63032e610e64b6a214cb91ef1130c3b5662
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in several places INT_MAX was implicitly converted to qreal.
when qreal is float, the compiler warns:
implicit conversion from 'int' to 'float' changes value
from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion]
the conversion is made explicit now
also in qfontengine.cpp operands are reordered
to let compiler pre-calculate part of the expression
Pick-to: 6.11 6.10 6.8 6.5
Change-Id: I7cba0f95e38d10f661dca9f085cf024a6f8a5f52
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the 2D case, we first assign m1 to m and then multiply m2 into it.
In the first three steps, we're using the fact that, at this point,
and for the fields referenced, m is still the same as m1.
This causes a dependency ordering of these three lines with respect to
the following three lines, though, making it both harder to read for
humans and harder to optimize for compilers. It also prevents us from
writing to m in memory order.
So don't read from m on the RHS, read from m1.
Amends 13b3545e833f6175f686c9776e1510db3f3f11eb.
Pick-to: 6.11 6.10 6.8
Change-Id: I8790974cb3337470d9359d09a943527a75f99527
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to padding, std::memcmp wasn't guaranteed to return 0
even if all (bit)fields of the two QAccessible::State
structs were identical.
This was e.g. causing various of the state-related tests
in tst_qaccessibility to fail in a Clang 21 build on Debian
testing.
Prevent randomness in the padding bits by making them explicit
using an explicit `qt_reserved` member.
All bits are already initialized to 0 in the ctor and
now updating another field can no longer result in random
values being written to the previously unreserved bits.
Fixes: QTBUG-142463
Pick-to: 6.11 6.10 6.8 6.5
Change-Id: Id62866a688d8e8dd13143961b1a22f36cac09caa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. This cannot be guaranteed for page margins.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
Amends 6c72080f26e9b70041434c6d762f7d601a2bf19c.
Pick-to: 6.11 6.10 6.8
Task-number: QTBUG-142020
Change-Id: I3d925316a4934dd0a7ca98722299efabf63a43e4
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 6.11 6.10 6.8 6.5
Task-number: QTBUG-115841
Change-Id: Iddda475ac9f828f632f0e18842a721313d5b22fd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 6.11 6.10 6.8 6.5
Task-number: QTBUG-115841
Change-Id: I0d5bd83090b951dc3b6b53c875404201823751dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace them with the equivalent non-compound assignment, so we can,
in a follow-up patch, replace the references to `m` on the RHS of the
expressions with references to `m1`.
This is the first step for porting the 2D case, like the 3D case, to
Qt::Uninitialized, which, in turn is a prerequisite for re-enabling
NRVO.
Amends 13b3545e833f6175f686c9776e1510db3f3f11eb.
Pick-to: 6.11 6.10 6.8
Change-Id: I8f32e413912f42f11aac4dcee4738d1b387c94d4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. This cannot be guaranteed for the quaternion elements.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
As a drive-by, put the operators at the beginning of continued lines,
as requested by https://wiki.qt.io/Qt_Coding_Style#Line_breaks Item 2.
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Change-Id: Ia317aa260ffc9fb04c10c24517a1ca3be58a1b05
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. This cannot be guaranteed for the vector elements.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
As a drive-by, put the operators at the beginning of continued lines,
as requested by https://wiki.qt.io/Qt_Coding_Style#Line_breaks Item 2.
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I55cfb520bda53e12532923005bb1ee6396b124f2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. This cannot be guaranteed for the matrix elements.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
As a drive-by, put the operators at the beginning of continued lines,
as requested by https://wiki.qt.io/Qt_Coding_Style#Line_breaks Item 2.
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: Iadcf753cb756112c86923c62d8cf9a44a793ec8c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. For a cursor position, this cannot be guaranteed.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
Amends 519e3963fad0761bac5629b1f6eabc58060265c0.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I994acabd644dc2838ecda39e159674fdc626cab9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Amends 476a5ff0ecd7b84066dc6fa9d85769ac108ffd1c, which made
QAbstractFileIconProvider a Q_GADGET.
Found in API-Review.
Change-Id: I206f38918515fb3e06778051153e8af8ad8c068a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
| |
Aligns with the existing APIs in the class.
Change-Id: Ia9f11138d93b37995c8084fd9a25070554cec7db
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. One user of this function cannot guarantee this, because, while
they check for zero, they do so _after_ calling qFuzzyCompare() with
that value, so the check comes too late.
Fix by swapping the two checks around (so we check for == 0 before we
check for == 1).
Amends 8c1532eeaae6a220569cef3476d1124399478285, which changed from
qFuzzyIsNull(x - 1) (which doesn't have the problem) to
qFuzzyCompare(x, 1) (which does).
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I054449b5510217f83479c5a028986c569f54084c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity complained that the while loop being changed by this patch
overflowed last_cluster from its initial ~0u value in the
post-increment operation.
It's correct that we overflow, but the old code wasn't wrong: unsigned
overflow is well-defined as mod 2^n, n = bit-width of the type, so we
overflow to zero, but then, two lines further down, unconditionally
overwrite said zero again. If we overflowed, that means that
last_cluster was still at ~0u, so cannot possibly have compared < that
`cluster`, another uint variable, so we couldn't get into the situation
that the loop continues because of 0 < cluster.
So this doesn't _need_ fixing, but in the spirit of "if Coverity
doesn't understand it, a human won't, either", let's improve the code
nonetheless.
Observe that last_cluster is being used both as the loop counter as
well as to hold the value across an outer loop. Separating the two
roles by introducing a dedicated loop counter shows that this is just
your typical run-of-the-mill for loop, so rewrite it as such.
Amends c77222c0e711d584bec880222412fc50d044005f (5.3).
Pick-to: 6.10 6.8 6.5
Coverity-Id: 898027
Change-Id: I8184bddc88e24a4a6612309ae59b64b99ca4c2d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These have been unused ever since they were introduced when
the AT-SPI2 bridge was added in commit
8e1ff45e74f529c7f49688242ea0fd25ce2913f3.
They also don't seem to correspond to anything in the
AT-SPI2 XML specifications or anything else in the
at-spi2-core repo [1].
Drop them.
[1] https://gitlab.gnome.org/GNOME/at-spi2-core/
Change-Id: I9e02db434eb06279b7393061f4796ad3da7f4d1e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Interfaces without an object calls deleteInterface directly,
issue ObjectDestroyed events also in this situation.
Task-number: QTBUG-141125
Change-Id: I0dc7ff5e45a5fe61af01957eb4c8088cc2e64e17
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These types happily hold NaNs and infinites, if you know what you're
doing, and so we can stream such objects out. We cannot then refuse to
stream them back in again.
[ChangeLog][QtGui][QVector2D/QVector3D/QVector4D] Fixed a bug in the
QDataStream operator that could lead to an assertion failure (program
termination) on reading back previously streamed out objects that
contain NaN or infinity values.
Amends 7a738daa97436478a21b5dd31ba2312b2cb2df41.
Pick-to: 6.10 6.8 6.5
Fixes: QTBUG-142431
Change-Id: I790d7fbc46e5bd48a2cbd7e8a26d9c90c5fe05b9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Make clear that this refers to the AtSpiAdaptor method.
Amends 7a478ff96f27fbfc8ddfbc67ba62276580aa02b4.
Change-Id: I1de073208b6347276f16a0b36523bb097ec398a3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
37c68503cbada547291ec4c4873dc054a8b82510 added the "count == 9" guard,
which effectively disabled the Qt 2 compatibility code.
Given that that compatibility code has been off for almost 5 years,
there is probably little point in fixing it now, so we might as well
remove it to simplify the QFont::fromString() function.
Change-Id: I677a033c74616c4cb5f24b750f47837d3ab75da8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Adds memory barrier when image/buffer has been written to in a shader.
This is required so that reads and writes are synchronized
between render calls.
Task-number: QTBUG-125121
Change-Id: Ic3b5881d246b451bb83e97f77aa6692513de904c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| |
|
|
|
|
|
|
|
| |
As found in laptops, like thinkpads.
And Key_Call for directfb.
Change-Id: I7858f5c81cff43c1550716e4141eef8209e4794f
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The static forces the compiler to allocate storage for the objects in
the executable, either causing relocations on startup, or, on GCC, a
pointless magic static guard:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84411
Make them constexpr instead. This allows the compiler to construct
them ad-hoc when one is needed (one lea, one movi).
Amends 8e1ff45e74f529c7f49688242ea0fd25ce2913f3.
Also port to _L1 UDLs, amending
7b6b133746aa8bf23e08753851d7e23cc9d76170.
Pick-to: 6.10 6.8 6.5
Change-Id: I0cce28154f1155a2abee88572424f3c73073efe5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
| |
With this change, variable axes can be saved and loaded from settings.
Task-number: QTBUG-141412
Change-Id: I0744d05cc38ac47d89f3e4314311906c28c0ec63
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The QMap shouldn't have been used as a sort() replacement, but now
that 'features' is itself a QMap, we can skip this step.
Amends 8fe6ad3eed40a8c851bf5d49e322f9794b9f7dcf.
Task-number: QTBUG-141412
Task-number: QTBUG-142246
Change-Id: Ia40f82a776758a18ce057b49769ac38f3d2fdddb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though the docs try to dismiss any guarantees as to the behavior
of the operator, they do mention it's there to make QFont usable as
keys in QMap. QMap, being a wrapper around std::map, requires the key
type to be sorted using a strict weak ordering.
The current QFont::operator<() is not a strict weak ordering.
In particular, because of the way the `features` QHash is compared
(lexicographically, as far as I can make out), and due to the nature
of QHash as an unordered container, it can easily happen that two
QFont objects compare equal, but one is _also_ less than the other,
according to this operator.
To see this, consider that two QHash objects are equal if their
linearizations are permutations of each other, but that doesn't mean
that these linearizations need to be lexicograpically equal: {{1, 2},
{2, 4}} is a permutation of {{2, 4}, {1, 2}}, but the former is
lexicographically strictly less the latter.
The minimal fix is to use a QMap instead of a QHash. QMaps are
ordered, so their linearizations are stable.
A more comprehensive fix would kick out the QMap for either the
std::map original, which, unlike QMap, already provides operator< that
we could just use, or QFlatMap, depending on how many elements we
expect in this container. Due to the leakage of of these types into
other parts of the code, including public API in QTextFormat, that
would be a larger undertaking, so is left for another day.
I am not, yet, fully convinced that the preceding size() check does
not also break strict-weak-ordering'ness, but at least it will not
cause _equal_ fonts to be reported as strictly less, too. A port to
lexicographical comparison would remove the last doubt, but is left
for a follow-up patch.
Amends 6160ea45b689e9d26795a18f155053ac4dc4dd6b.
Task-number: QTBUG-142246
Pick-to: 6.10 6.8
Change-Id: I3db7b370592e100efaf5148e4c0e91d1d1925830
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
| |
|
|
|
|
|
|
| |
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Change-Id: I6773339a66806b07984fdc4772fa563891d53b0e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The qt_set01 function had a critical argument quoting flaw. This
happened because CMake removes quotes when calling the function, causing
variable substitution in the condition evaluation. For example, calling
qt_set01(QNX CMAKE_SYSTEM_NAME STREQUAL "QNX") with QNX already set to 1
would evaluate CMAKE_SYSTEM_NAME STREQUAL QNX (where QNX expands to 1)
instead of CMAKE_SYSTEM_NAME STREQUAL "QNX".
This particularly affected users with QNX toolchains that pre-set the
QNX variable, causing configure to fail.
Replace all qt_set01 calls with explicit if/else blocks that properly
preserve string literals and avoid the eval-like behavior. Remove the
qt_set01 function.
The platform detection code is now admittedly more verbose but plain
CMake without argument quoting pitfalls.
Pick-to: 6.8 6.10
Fixes: QTBUG-142267
Change-Id: I642fc8582001b8c7b7b6ff56eae7ccabc89ba565
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Functions in which owning containers allocate should not be defined
inline, because of the amount of code generated.
Unlike similar changes in the past, this wasn't found by Clang
-ftime-trace, but highlighted by adding GCC -Wnrvo to headersclean.
Instead of rewriting the function, pull it behind the ABI boundary.
Can't pick back, because it adds an exported symbol (on Unix, Windows
already had it, due to the wholesale export of the class), so isn't
forwards-BC.
Change-Id: I0d7ac417e129023f9688028685e818e7ab6ab7e2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Says GCC:
qfont.cpp:2202:81: required from here
2202 | fontDescription += comma + tag.toString() + u'=' + QString::number(value);
| ^
qstringbuilder.h:403:37: warning: ‘static void QConcatenable<QByteArray>::appendTo(const QByteArray&, QChar*&)’ is deprecated: Use fromUtf8, QStringLiteral, or QLatin1StringView [-Wdeprecated-declarations]
403 | QConcatenableEx<B>::appendTo(p.b, out);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
qstringbuilder.h:372:43: note: declared here
372 | QT_ASCII_CAST_WARN static inline void appendTo(const QByteArray &ba, QChar *&out)
| ^~~~~~~~
This is because Tag::toString() returns QByteArray, not QString.
To fix, wrap the toString() result in QLatin1StringView. This is
safe, because the temporary QByteArray will be kept alive until the
end of the full-expression, so until after op+= has executed.
It does change the serialization vis-a-vis the old code, but a) only
for non-US-ASCII tags, which are not really valid, and b) we make it
more robust now, because each random 4-octet sequence is a valid L1
string, but many are not valid UTF-8, so their interpretation as U8
by the old code (QByteArray → QString assumes U8) depends on
behavior of Qt outside its spec. GIGO applies, of course, but we
don't tend to specify the GO for any given GI, so it's better to use
an algorithm for which no input is "garbage".
Amends 8fe6ad3eed40a8c851bf5d49e322f9794b9f7dcf.
Task-number: QTBUG-141412
Change-Id: Ic45f9147ca54201a33d953da57b768d2a5d115e4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code consistently treats the op<() argument as the LHS and *this
as the RHS, so it actually implements greater-than.
Nothing that needs changing, as the docs don't promise anything and
it's perfectly fine to implement op< using greater-than semantics, if
done consistently, but worth nothing, because it may raise eyebrows,
as it did in this author.
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142246
Change-Id: If5aafa4e01a963e622c1ad72deb265477855ec48
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][configure] Added a -generate-vcpkg-manifest configure
option. This generates a vcpkg.json file in the build directory. To just
generate the manifest without configuring Qt, run configure with
-generate-vcpkg-manifest -dry-run.
[ChangeLog][configure] When configuring with -vcpkg, generate a vcpkg
manifest file in the build directory, and set VCPKG_MANIFEST_DIR to the
build directory to use that manifest file. You can turn off the manifest
generation with -no-generate-vcpkg-manifest. You can turn off setting
the manifest directory by passing -- -UVCPKG_MANIFEST_DIR to configure.
Configuring with pure CMake won't generate a vcpkg.json.
This patch adds a low-level CMake API for creating vcpkg manifests in
QtVcpkgManifestHelpers.cmake.
The functions qt_find_package and qt_feature gained arguments for
creating dependencies in the manifest and add them to features.
This adds a package dependency (not guarded by any feature):
qt_find_package(WrapSystemFreetype 2.2.0 MODULE ...
VCPKG_PORT freetype
VCPKG_VERSION 2.3.4
)
This adds a package dependency `freetype` to the feature `freetype`:
qt_find_package(WrapSystemFreetype 2.2.0 MODULE ...
VCPKG_PORT freetype
VCPKG_ADD_TO_FEATURE freetype
)
This adds a feature `freetype` with `gui` as its "parent dependency":
qt_vcpkg_scope(gui)
...
qt_feature("freetype" PUBLIC PRIVATE
SECTION "Fonts"
LABEL "FreeType"
PURPOSE "Supports the FreeType 2 font engine (and its supported font formats)."
)
If features are turned on/off via configure arguments, we set the CMake
variables VCPKG_MANIFEST_NO_DEFAULT to ON and VCPKG_MANIFEST_FEATURES to
the list of corresponding vcpkg features to only install libraries that
are needed for the build.
For a per-repo build, we create a vcpkg.json with dependencies only for
that repository.
For a top-level build, we create a vcpkg.json with all dependencies of
all repositories, excluding those that have been skipped (with
configure's -skip argument).
Task-number: QTBUG-73760
Change-Id: I6cc449d712f32d9e564acecaede5a7b31f309a8c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|